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

HeaderContextMenu Postback?

2 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joaquín
Top achievements
Rank 2
Joaquín asked on 10 Sep 2012, 05:54 PM
Hi guys,

Is it possible to make the HeaderContextMenu to do a postback when you check/uncheck any Column submenu item to show/hide a column?

I need the postback to be able to save the column visibility state on the user's profile. I'm using this code to do it so.

I have tried attaching a new handler to the RadGrid.HeaderContextMenu.ItemClick event, but this event doesn't fire when checking/unchecking a column in the submenu.

Thank you in advance,
Joaquín

2 Answers, 1 is accepted

Sort by
0
Accepted
Antonio Stoilkov
Telerik team
answered on 13 Sep 2012, 11:24 AM
Hello Joaquín,

You could achieve your scenario by subscribing to the RadGrid OnColumnShown and OnColumnHidden events and in the event handlers trigger a postback to update the state.
<ClientSettings>
    <ClientEvents OnColumnShown="ColumnShown" OnColumnHidden="ColumnHidden" />
</ClientSettings>

Kind regards,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Joaquín
Top achievements
Rank 2
answered on 14 Sep 2012, 10:39 AM
Thank you Antonio.
Tags
Grid
Asked by
Joaquín
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Joaquín
Top achievements
Rank 2
Share this question
or