New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Localizing the Grid Headers
If you develop a multilingual application, you might want to show grid headers text as per the current culture settings. This functionality is can be attained with Telerik RadGrid in the same way as with MS GridView (both controls will behave similarly when you switch the culture for the page which holds it).
The first option to localize the header text is dynamically through resource files as shown here. Another possible solution is illustrated below (note that the first example is for auto-generated columns and the second example is for declarative columns):
Example 1
ASP.NET
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" DataSourceID="SqlDataSource1" AllowSorting="True"
runat="server" OnColumnCreated="RadGrid1_ColumnCreated">
<MasterTableView Width="100%" AutoGenerateColumns="True" />
</telerik:RadGrid>
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource>
Example 2
ASP.NET
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid2" DataSourceID="SqlDataSource2" AllowSorting="True"
runat="server" HorizontalAlign="NotSet">
<MasterTableView Width="100%" AutoGenerateColumns="False" DataSourceID="AccessDataSource2">
<Columns>
<telerik:GridBoundColumn DataField="ContactName" HeaderText="" UniqueName="ContactName" />
<telerik:GridBoundColumn DataField="ContactTitle" HeaderText="" UniqueName="ContactTitle" />
<telerik:GridBoundColumn DataField="Address" HeaderText="" UniqueName="Address" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource>