Title: pass id from datagrid to datagrid under dialog box Post by: john17 on July 20, 2014, 06:22:46 PM hi guys,
how can i pass the id of the select row in datagrid to another datagrid under/inside the edit dialog box? here is my reference : http://www.jeasyui.com/tutorial/app/crud.php thanks ;D ;D ;D Title: Re: pass id from datagrid to datagrid under dialog box Post by: stworthy on July 21, 2014, 12:02:39 AM Call 'getSelected' method of datagrid to get the selected row data. You can call 'reload' method to reload another datagrid by passing the selected id value of the first datagrid. Please refer to the code below:
Code: var row = $('#dg1').datagrid('getSelected'); Title: Re: pass id from datagrid to datagrid under dialog box Post by: john17 on July 21, 2014, 12:14:40 AM thank you very much stworthy for your reply very much appreciated I will try the code and comeback for the outcome
Title: Re: pass id from datagrid to datagrid under dialog box Post by: john17 on July 21, 2014, 01:33:01 AM hi guys,
for the sake of others here's what I've done Code: <table id="dg2" class="easyui-datagrid" style="width:auto;max-width:1300px;height:auto" rownumbers="true" fitColumns="true" singleSelect="true" autoRowHeight="false"> Code: var row = $('#dg').datagrid('getSelected'); Quote noted! this data grid is inside a edit dialog box my reference is in my first comment Quote Thank you stworthy!! |