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

dynamic enable / disable sorting in Kendo grid + jquery

1 Answer 647 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mayank
Top achievements
Rank 1
mayank asked on 20 Jun 2013, 12:44 PM
Hello
I am using kendo grid.
in keno grid i want to enable/disable sorting functionality dynamic based on condition. when grid apply grouping to any column then grid sorting disable else sorting enable.

i tried below code but some issue occur
onGridDataboundEvent

   var GroupTable = $(gridName + ' .k-grouping-header').find('div');
                    if (GroupTable.length > 0) {
                    $(gridName).find('TH a').bind('click' , function(){return false;}).css('text-decoration', 'none').css('cursor','default');     

                    }
                    else {
                               $(gridName).find('TH a').bind('click' , function(){return true;}).css('text-decoration',
'underline').css('cursor','pointer');     
                    }

Thanks

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 24 Jun 2013, 12:14 PM
Hi mayank,

Thank you for getting in touch with us.
Runtime enabling/disabling the sorting feature of the Grid is not supported out of the box. In this forum thread you will find a workaround for such scenarios.

Regards,
Alexander Valchev
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
mayank
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or