Hi telerik ppl:
Im using this code to swap languages for the column headers and also for the grouping fields labels within the group panel.
protected void RadGrid1_ItemCreated(object sender,GridItemEventArgs e){ if (e.Item is GridHeaderItem) { string strControl = ""; GridHeaderItem headerItem = e.Item as GridHeaderItem; headerItem["IDColumn"].Text = GetResource("Document ID"); headerItem["companyColumn"].Text = GetResource("Company"); headerItem["nameColumn"].Text = GetResource("Name, First"); headerItem["dueDateColumn"].Text = UBGlobal.GetResource("Due Date"); headerItem["ageColumn"].Text = GetResource("Age"); headerItem["assignedToColumn"].Text = GetResource("Assigned To"); headerItem["activityTypeCodeColumn"].Text = GetResource("Next Activity"); headerItem["subjectColumn"].Text = GetResource("Last Activity Notes"); headerItem["phoneColumn"].Text = GetResource("Phone"); } if (RadGrid1.GroupPanel.GroupPanelItems.Count > 0) { RadGrid1.GroupPanel.GroupPanelItems.Count.ToString()); for (int i = 0; i < RadGrid1.GroupPanel.GroupPanelItems.Count; i++) { RadGrid1.GroupPanel.GroupPanelItems[i].Text = GetResource(RadGrid1.GroupPanel.GroupPanelItems[i].Text); } } }
The problem here is that the objects within the Group Panel are not being translated when loading the grid or after draging and drop a column into the group panel.......the traslations are only being done when colapsing or expanding the grid rows.
I think this is because the Group Panel doesnt have elements when the ItemCreated Event is fired.....so my questions are:
1.- When is the Group Panel being populated.
and/or
2.- is there a better way to localize the Group Panel elements.......
This must be done in CODEBEHIND.....srry about the caps, are only to emphasize the fact that I cant use the fieldAlias property due to the fact that 3 different language translations must be done and the texts are changed so oftenly.
Thks in advance