Author Topic: Filtering nested grids and main grid  (Read 2959 times)

joevernon

  • Newbie
  • *
  • Posts: 5
    • View Profile
Filtering nested grids and main grid
« on: January 21, 2016, 10:36:49 pm »
Hi

I was just wondering if it is possible to use the filter methods to apply filters across nested grids as well as the main grid if both grids have a common dataIndx column?

Thanks
Joe

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Filtering nested grids and main grid
« Reply #1 on: January 22, 2016, 01:39:48 pm »
They can't be combined, you have to call filter method of the detail grid separately.

joevernon

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Filtering nested grids and main grid
« Reply #2 on: January 22, 2016, 04:31:46 pm »
How do you select the detail grid of a particular row to apply a filter?

For example using a toolbar on each detail grid to filter just that detail grid

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Filtering nested grids and main grid
« Reply #3 on: January 23, 2016, 11:57:52 am »
Every event has context and/or event.target which can be used to get reference to appropriate grid.

Let's say there is a toolbar for a detail grid.

When a filter button is clicked in that toolbar, reference to grid can be obtained by

Code: [Select]
var $grid = $( event.target ).closest( ".pq-grid" );