EasyUI Forum
May 03, 2024, 04:03:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: how can i show my custom msg in the datagrid body,when the remote data.tatal = 0  (Read 7879 times)
next
Newbie
*
Posts: 1


View Profile Email
« on: April 24, 2014, 03:26:29 AM »

how can i show my custom emptyText in the datagrid body,when the remote data.tatal = 0. I try it in the onLoadSuccess callback then appendRow and mergeCells but it seems no good, the gridheader columns will be merge too. the core like below:
onLoadSuccess:function (response) {
   if (!response.total) {
      $(selector).datagrid('appendRow',{
         'fieldName':'emptyText'
      }).datagrid('mergeCells',{
         index: 0,
         field: $(selector).datagrid('getColumnFields')[0],
         colspan: $(selector).datagrid('getColumnFields').length
      })
   }
}

ps: i hope it can be setting options like {emptyText:'no data!'}
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 24, 2014, 06:20:58 AM »

Please refer to this topic http://www.jeasyui.com/forum/index.php?topic=1881.0
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!