HeaderContextMenu Postback?

3 posts, 1 answers
  1. Joaquín
    Joaquín avatar
    27 posts
    Member since:
    Jan 2012

    Posted 10 Sep 2012 Link to this post

    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. Answer
    Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 13 Sep 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joaquín
    Joaquín avatar
    27 posts
    Member since:
    Jan 2012

    Posted 14 Sep 2012 Link to this post

    Thank you Antonio.
Back to Top