Disabling headercontextmenu for a templatecolumn

2 posts, 1 answers
  1. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 21 Feb 2013 Link to this post

    Hi,
    I Have a RadGrid in which I have enabled the headercontextmenu (EnableHeaderContextMenu="True" / EnableHeaderContextFilterMenu="True")

    For a templatecolumn I want to disable the headercontextmenu. How do I do this?

    Paul
  2. Answer
    Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 21 Feb 2013 Link to this post

    Hello,

    function OnHeaderMenuShowing(sender, eventArgs) {
                  if (eventArgs.get_gridColumn().get_uniqueName() == "MemberType") { // Membertype is column Unique name
                      eventArgs.set_cancel(true);
                  }
              }
    <ClientSettings>
                  <ClientEvents OnHeaderMenuShowing="OnHeaderMenuShowing" />
              </ClientSettings>
    <telerik:GridTemplateColumn HeaderText="MemberType" UniqueName="MemberType">
                           <ItemTemplate>
                               <asp:Label ID="Label1" runat="server" Text="1"></asp:Label>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>



    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top