简体   繁体   中英

How to customize Telerik Header Context Menu?

I want to customize the Telerik Header Context Menu by adding additional button to it and I want to change labels of existing buttons. How can I do it? I know that I can set custom CSS class , but this is not I'm looking for.

在此处输入图像描述

You can try something like that:

Protected Overloads Overrides Sub OnPreRenderComplete(ByVal e As EventArgs)Dim menu As RadContextMenu = RadGrid1.HeaderContextMenu
    Dim item As New RadMenuItem()
    item.Text = "Format"
    item.Attributes("ColumnName") = String.Empty
    item.Attributes("TableID") = String.Empty
    BuildColumnsMenu(item, RadGrid1.MasterTableView)
    menu.Items.Add(item)
    MyBase.OnPreRenderComplete(e)End Sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM