EasyUI Forum
May 17, 2024, 08:07:30 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: load data into Datagrid with checkbox-es  (Read 6168 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: September 29, 2016, 02:03:50 AM »

I could not see in Documentation/Demo/Tutorial how to load data into datagrid and set checkboxes where it is needed.

Can you show how to do this?

Thanks
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: September 29, 2016, 02:25:56 AM »

After loading the data, call 'checkRow' method to check what rows you want.
Code:
$('#dg').datagrid({
onLoadSuccess: function(){
$(this).datagrid('checkRow', ...);
}
});
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: September 29, 2016, 03:01:04 AM »

I'm talking about automatic checkbox set like it works for Tree for example

Like here: http://www.jeasyui.com/tutorial/tree/data/tree_data.json
I set it checked and it appears in datagrid as checked.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #3 on: September 29, 2016, 03:18:58 PM »

You have to call the checkRow method manually by yourself. Of course, you can extend the view to achieve this functionality.
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!