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

[Solved] ContextMenu: Client Side Event

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin
Top achievements
Rank 1
Kevin asked on 08 Feb 2012, 06:57 PM
Hi.

We would like to allow the user save their preferences on a grid such as what columns they wish to see and what order.

Is there a way to capture an event on the Context Menu?

I don't seem to see anything supporting that a column was hidden or added back via an client side api event..

Any advice on this would be greatly appreciated.

Thanks,
Kevin.

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 09 Feb 2012, 08:08 PM
Hello Kevin,

There isn't event that is being triggered whenever column visibility is changed through the context menu. However you can use the following script to track when and which column is manipulated:
$(document).delegate("#Grid_contextMenu [type=checkbox]", "change", function() {
 var index = $(this).data("field"); 
 var column = $("#Grid").data("tGrid").columns[index];
 alert(column.member);
} )


All the best,
Nikolay Rusev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or