Title: ctrlSelect in treegrid and dynamically changing singleSelect Post by: A-K on September 03, 2014, 01:33:41 PM Hey, I am using treegrid with the newest version of EasyUI 1.4.
Is there a reason that ctrlSelect does not work with treegrid while most of the properties extend from datagrid? And also I noticed that when changing the singleSelect dynamically in datagrid everything works great and it changes the selection method as wanted. But when trying the same in treegrid it does not change the selection method, Is it a bug? (treegrid and datagrid both are configured with singleSelect : true on start) This code works great in Datagrid: Code: $('#dg').datagrid('options').singleSelect = false; This code does not work in treegrid: Code: $('#tt').treegrid('options').singleSelect = false; both methods are called via onclick function. I am in a position that I cant change to multiselect in treegrid dynamically and I cant use ctrlSelect but I dont want multiselect on start. What can I do? Thanks. Title: Re: ctrlSelect in treegrid and dynamically changing singleSelect Post by: stworthy on September 03, 2014, 06:30:02 PM Please try this:
Code: $('#tt').treegrid({ Code: $('#tt').datagrid('options').singleSelect = false; Title: Re: ctrlSelect in treegrid and dynamically changing singleSelect Post by: A-K on September 04, 2014, 08:53:11 AM Thanks it works great. the second method is much better because it wont call onLoadSuccess again and the first method will..
And I also asked about ctrlSelect in treegrid, Is there a way to make it work? or will it be in the next version? Title: Re: ctrlSelect in treegrid and dynamically changing singleSelect Post by: stworthy on September 04, 2014, 03:17:17 PM The 'ctrlSelect' property is inherited from datagrid, it also works in treegrid.
Code: $('#tt').treegrid({ Title: Re: ctrlSelect in treegrid and dynamically changing singleSelect Post by: A-K on September 04, 2014, 10:52:00 PM Thanks! The diffrence is if you put only ctrlSelect: true in datagrid everything works great
but in treegrid you have to put ctrlSelect: true and singleSelect: false. Maybe it should be added to the documentation of the treegrid for the rest of the people that thought there is no ctrlSelect in treegrid. |