This is a migrated thread and some comments may be shown as answers.

column reordering and reordered event

5 Answers 458 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lihong
Top achievements
Rank 1
Lihong asked on 11 Jul 2015, 09:15 AM

I knew, there was an event "columnReorder", after order of column was changed.

But, I need another event "columnReordering", that is fired before order of column will be changed, and with these parameters: cancel (true/false), column (kendo.ui.gridcolumn), sender (kendo.ui.grid), newIndex (number), oldIndex (number). If cancel is "true", reordering will be rejected right now.

Do you have any suggestion?

5 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 13 Jul 2015, 09:01 AM

Hello Lihong,

Such event is not available in the Kendo UI Grid. A workaround would be to check the condition in the columnReorder event and trigger the reordering of the column manually again to return it at it's old index. Here is small example of this approach.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lihong
Top achievements
Rank 1
answered on 14 Jul 2015, 01:27 AM

I don't think your approach is a good method. From third to sixth, then from sixth to third again right now, column will wobble a bit.

"columnRecordering" is very useful and important.

And I also found, there was only "sort" event, without "sorting" event. In most cases, we need to do something before some event is fired.

Why did you remove many "...ing" events?

0
Dimiter Madjarov
Telerik team
answered on 14 Jul 2015, 10:31 AM

Hello Lihong,

Kendo UI never supported the mentioned events. If you consider that it's a good idea too add such event, I would suggest to post it in our User Voice portal, where we could measure if the feature is wanted from other users too.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lihong
Top achievements
Rank 1
answered on 15 Jul 2015, 01:35 AM

​We've ever used your UI ​for Silverlight, and these "...ing" events and "...ed" events helped us a lot. For example, according to my requirement, we can reject an action, or change parameters of an action before it can take effect.

Now, when ​we are ​using Kendo UI, a lot of things become very difficult.

Similarly, when I want to close a "kendo.ui.window", there is no "closing" event before window will be closed.

I've checked your source code, and add "sorting", "columnReordering", or "closing" event is very easy for you.

Why we need to post it to user voice portal?

0
Dimiter Madjarov
Telerik team
answered on 15 Jul 2015, 11:13 AM

Hello Lihong,

Posting the idea in the User Voice portal is the way to measure how many people want a specific feature to be implemented in the framework. The most voted ideas are brought into consideration for including them in our future development plans.

Thanks for the understanding.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Lihong
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Lihong
Top achievements
Rank 1
Share this question
or