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

No lacalization on bound Column

1 Answer 6 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonnyenglisch
Top achievements
Rank 1
Jonnyenglisch asked on 14 Oct 2008, 08:07 AM
Hello,

I use the Rad Grid Control in a DotNetNuke Module and  I can't not localisize like how you discripe in the telerik example:

 

protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)

 

{

 

GridColumn boundColumn = e.Column as GridColumn;

 

 

switch (boundColumn.UniqueName)

 

{

 

case "Stop":

 

boundColumn.HeaderText =

"My customized contact name";

 

 

break;

 

 

case "SpotTime":

 

boundColumn.HeaderText =

"My customized contact title";

 

 

break;

 

 

case "Address":

 

boundColumn.HeaderText =

"My customized address";

 

 

break;

 

 

default :

 

boundColumn.HeaderText =

"default";

 

 

break;

 

}

}

Nothing is changing ?

What is my mistake ?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 16 Oct 2008, 10:58 AM
Hello Jonnyenglisch,

You can take a different approach, as the column created handler is raised for auto generated colunms only:

.cs
  protected void RadGrid1_PreRender(object sender, EventArgs e)  
    {  
        GridHeaderItem header = (GridHeaderItem)RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0];  
        header["CustomerID"].Text = "customText";  
    } 

I hope this suggestion helps.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Jonnyenglisch
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or