EasyUI Forum

General Category => General Discussion => Topic started by: catpaw on May 21, 2015, 12:52:03 PM



Title: datagrid collapse false on click event
Post by: catpaw on May 21, 2015, 12:52:03 PM
hello

I have a chart that in the event click need my datagrid to expand.

the initial properties of the datagrid are:

<table id="dgA" class="easyui-datagrid" style="width:auto; height:400px;" title="Title of table" pagination="false" rownumbers="true" nowrap="false" fitColumns="false" singleSelect="true" striped="true" showFooter="true" remoteSort="false" data-options="
                url:'source/get.php',
                collapsible:true,
                collapsed:true,

                view:scrollview,
                autoRowHeight:false,
                pageSize:20">

then the event:

Code:
events: {
click: function (e) {
//$('#dgA').datagrid('collapsed',false); //-----------> I tried....luckless
$('#dgA').datagrid('getPanel').panel('expand',true); //-----------> I tried....luckless
//$('#dgA').datagrid({collapsed:false}); //-----------> I tried....luckless
}
}

any help will be appreciated


Title: Re: datagrid collapse false on click event
Post by: catpaw on May 21, 2015, 06:32:13 PM
I solved my problem with:

Code:
$('#dgA').datagrid('getPanel').panel('expand',true);
$('#dgA').datagrid({
collapsed:false
});

regards!!