I have an application where I am loading a single row in a grid, and expanding the row to show additional details. I have been unable to find any solutions for this. It seems like I should be able to tie something into the event onLoadSuccess. Below is my code for the expanded row. (furthest on bottom).
I tried adding the following code (both rows 0 and 1), but the code simply made it so the expand rows feature was completely disabled (I have tried other code options, not many, but did not take notes on what they were).
onLoadSuccess: function()
{ $('#wells').datagrid('expandRow', 0); }
Expand row code listed below;
<script type="text/javascript">
$('#wells').datagrid(
{
view: detailview,
detailFormatter:function(index,row)
{return '<div class="ddv" style="padding:5px 0"></div>';},
onExpandRow: function(index,row)
{
var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
ddv.panel(
{
border:false,
cache:false,
href:'getexpandwell.php?api='+row.api,
onLoad:function()
{ $('#wells').datagrid('fixDetailRowHeight',index); }
});
$('#wells').datagrid('fixDetailRowHeight',index);
}
});
</script>
And the origional table that is being expanded...
<table id="wells" class="easyui-datagrid" title="<?php echo "$wellname $wellnum"; ?>" style="width:100%;height:300px"
pagination="false" idField="api" fitColumns="true" url="getwell.php?api=<?php echo $api; ?>"
collapsible="true" singleSelect="true" resizeHandle="both"
autoRowHeight="true" nowrap="false">
<thead>
<tr>
<th data-options="field:'well_name',width:48" sortable='true'>Name</th>
<th data-options="field:'well_num',width:18" sortable='true'>Num</th>
<th data-options="field:'field',width:48" sortable="true">Field</th>
<th data-options="field:'pad',width:36" sortable="true">Pad</th>
<th data-options="field:'api',width:32" sortable="true">API</th>
<th data-options="field:'legal_description',width:46" sortable="true">Legal</th>
<th data-options="field:'county_state',width:40" sortable="true">County, State</th>
<th data-options="field:'lease',width:33" sortable="true">Lease</th>
<th data-options="field:'unit_ca_pa',width:57" sortable="true">Unit CA PA</th>
<th data-options="field:'status',width:27">Status</th>
<th data-options="field:'status_date',width:22">Updated</th>
<th data-options="field:'wildlife_stips',width:75">Wildlife Stips</th>
<th data-options="field:'notes',width:75">Notes</th>
</tr>
</thead>
</table>