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

Grid Header Localized

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Per Holmqvist
Top achievements
Rank 2
Per Holmqvist asked on 05 Aug 2015, 12:36 PM

I know that I can localize the GridHeaders like the below

 

Protected Sub MyGrid_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles MyGrid.ItemCreated​

  If TypeOf e.Item Is GridHeaderItem Then
    Dim headerItem As GridHeaderItem = CType(e.Item, GridHeaderItem)

    Dim header As GridHeaderItem = CType(e.Item, GridHeaderItem)

    header.Cells(9).Text = Resources.PageLocalizations.GridHeaderApp
    header("Active").Text = Resources.PageLocalizations.GridHeaderActive​

  End If

End Sub

 

But the headers in Insert/edit mode doesn't get changed when using EditMode="PopUp"

Anyone knows how to edit the headers there?

 

Best Regards Pelle

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Aug 2015, 03:19 PM
Hi Pelle,

You can use the following approach to achieve this requirement:
protected void RadGrid1_DataBinding(object sender, EventArgs e)
{
    foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
    {
        if (col.UniqueName == "ShipName")
        {
            col.HeaderText = "Success";
        }
    }
}

That should do the trick. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Per Holmqvist
Top achievements
Rank 2
Answers by
Eyup
Telerik team
Share this question
or