EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Aod47 on July 18, 2017, 07:51:47 PM



Title: DataGrid Card View -- How to display description field below row column data?
Post by: Aod47 on July 18, 2017, 07:51:47 PM
May be I used a wrong word in question. Could you please advice how to apply Card View like this picture?


Title: Re: DataGrid Card View -- How to display description field below row column data?
Post by: stworthy on July 20, 2017, 02:05:07 AM
The detail view may be more suitable.
While using the detail view, expand all the rows after loading data successfully.
Code:
onLoadSuccess: function(){
  var len = $(this).datagrid('getRows').length;
  for(var i=0; i<len; i++){
    $(this).datagrid('expandRow',i)
  }
}

If you don't want to display the expander button, please set the 'hidden' property to true for this column.
Code:
{field:'e',width:40,expander:true,hidden:true},
{field:'itemid',title:'Item ID',width:80},
{field:'productid',title:'Product ID',width:100,sortable:true},
...