Author Topic: How to load the detail grid with data when the page first loads?  (Read 2342 times)

zvardar

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hi,

We would like to fill the details grid, by using some of the cells in the first row of the master data when the page first loads, before the rowClick event.
How could it be done?

Thank you for your help.

Regards.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to load the detail grid with data when the page first loads?
« Reply #1 on: July 19, 2016, 09:45:06 am »
detail view/grid is initialized only ( for performance reasons ) when row in parent grid is expanded by

1. user interaction

  or

2. adding show: true in the pq_detail property of the rowData.
rowData.pq_detail = { 'show': true };

Reference to first row data in main grid can be obtained by
Code: [Select]
this.getRowData({rowIndx: 0})
inside the detailModel.init() callback  and you can show it in the detail grid using column.render callback.

Hope it helps.
« Last Edit: July 19, 2016, 09:52:33 am by paramquery »