Detail Caption Update on Master change

QuestionsDetail Caption Update on Master change
S19K15 asked 11 months ago

Hi, is there any way to update the caption of child grid when using tab-master-detail based on selected record of master's grid?
For example when a user changes the selected record on master grid the property "caption" of detail grid must change -> $grid_detail_jott["caption"] = "ID:"."-".intval($_GET["IDNumb"]);

3 Answers
Abu Ghufran answered 11 months ago

$opt["onSelectRow"] = "function(id){ $('#list2').jqGrid('setCaption','Details for ID: '+id); }";
$grid->set_options($opt);

where list2 is detail grid id.

S19K15 answered 11 months ago

Can i take a different data field from my master grid columns ecxept the id?

Abu Ghufran answered 11 months ago

For grid id list1, if you want to get data of column 'invdate' selected row:
jQuery('#list1').jqGrid('getCell', id, 'invdate');

Your Answer

10 + 6 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!