Author Topic: Two grid instead of nested grids  (Read 3818 times)

qmaan

  • Newbie
  • *
  • Posts: 11
    • View Profile
Two grid instead of nested grids
« on: May 29, 2014, 08:36:37 pm »
Hi gurus,

I am working on a situation in which i need a separate grid on selection of row of first grid on the same page...e.g there is a grid of classes of a college. when somone click on a specific class .. all of its students should appear on a separate grid.. So directions needed that how i can achieve with paramquery server side .

Regards

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Two grid instead of nested grids
« Reply #1 on: May 29, 2014, 10:40:05 pm »
There is an example to follow:

http://paramquery.com/demos/master_detail

The idea is to send class ID (primary key of class table) to the server and fetch student list from students table for the 2nd grid. Class ID might be foreign key in students table.
« Last Edit: May 29, 2014, 10:45:30 pm by paramquery »

qmaan

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Two grid instead of nested grids
« Reply #2 on: May 30, 2014, 08:40:06 pm »
Thanks. I am able to get rowIndex but unable to get and row data or id e.g

 rowSelect: function (evt, obj) {
            //alert(obj.data[obj.rowIndx][2]);
            var orderID = obj.data[obj.rowIndxPage][2];
}

i tried with
  • or [1] or by entering colm attribute name


qmaan

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Two grid instead of nested grids
« Reply #3 on: May 30, 2014, 08:58:28 pm »
got working
« Last Edit: May 30, 2014, 09:16:09 pm by qmaan »