EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Alfred on November 23, 2016, 10:05:45 AM



Title: How to show detail view using onDblClick
Post by: Alfred on November 23, 2016, 10:05:45 AM
I want to show detail view of datagrid using onDblClick. I am using this example http://www.jeasyui.com/tutorial/datagrid/datagrid21.php (http://www.jeasyui.com/tutorial/datagrid/datagrid21.php).

Code:
<table class="easyui-datagrid" 
    data-options="onDblClick:function(index, row){
       //view: detailview; I don't know how to expand it from here like clicking the plus symbol
}">

Thanks


Title: Re: How to show detail view using onDblClick
Post by: jarry on November 24, 2016, 08:22:13 AM
Please call 'expandRow' method to expand a row.
Code:
onDblClickRow:function(index,row){
  $(this).datagrid('expandRow',index);
}


Title: Re: How to show detail view using onDblClick
Post by: Alfred on November 24, 2016, 10:27:27 AM
Thanks, Jarry. It works like a charm.