Title: $('#dg').datagrid('expandRow', rowIndex); not working Post by: andyj on November 04, 2016, 04:06:30 AM I have a datagrid with subgrid.
It's along the lines of http://www.jeasyui.com/tutorial/datagrid/datagrid22.php With a parent record row expanded, upon double-clicking a child record, a modal form is opened and when submitted, it saves, and reloads the parent datagrid. I want it to re-select the parent record and expand the parent record. Everything works fine except it will not expand the record. Here's my code. I get the parent id from the form, and from that get the rowIndex. I understand the method is: $('#dg').datagrid('expandRow', rowIndex); Code: function updateRecordTask() { Everything works except the expandRow method.... Any ideas why it won't expand the row? Thanks :) Title: Re: $('#dg').datagrid('expandRow', rowIndex); not working Post by: andyj on November 04, 2016, 04:25:12 AM I have found a fix. It seems the datagrid needed a little coffee break to update.
I added a setTimeout Code: setTimeout(function(){$('#dg').datagrid('expandRow',_rowid)}, 500); Now working fine. |