I have the following grid:
I want to access by code the GridTemplateColumn's HeaderTemplate Labels (for example "Label46") to change the Text property. How can I do this in C#?
Thanks.
<telerik:RadGrid ID="RadGridAziendeForUser" runat="server" DataSourceID="ObjectDataSourceAziendeUtente" |
EnableEmbeddedSkins="False" GridLines="None" Skin="MachinaWeb" AllowAutomaticUpdates="True" |
AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowMultiRowSelection="True" |
AutoGenerateEditColumn="True" |
OnItemCommand="RadGridAziendeForUser_ItemCommand"> |
<ClientSettings EnablePostBackOnRowClick="True"> |
<Selecting AllowRowSelect="True" /> |
<Scrolling EnableVirtualScrollPaging="True" ScrollHeight="200px" /> |
</ClientSettings> |
<MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSourceAziendeUtente" |
EditMode="InPlace" CommandItemDisplay="Top" DataKeyNames="IdUtente,IdAzienda"> |
<CommandItemTemplate> |
<div style="float: left;"> |
<asp:LinkButton Text="Nuova Azienda" ID="Insert" runat="server" CommandName="InitInsert" /> |
</div> |
</CommandItemTemplate> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px" /> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px" /> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="IdUtente" DataType="System.Int64" HeaderText="IdUtente" |
ReadOnly="True" SortExpression="IdUtente" UniqueName="IdUtente" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="IdUtenteAsp" HeaderText="IdUtenteAsp" SortExpression="IdUtenteAsp" |
UniqueName="IdUtenteAsp" DataType="System.Guid" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" ReadOnly="True" |
SortExpression="UserName" UniqueName="UserName" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="IdCultura" DataType="System.Int64" HeaderText="IdCultura" |
ReadOnly="True" SortExpression="IdCultura" UniqueName="IdCultura" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn> |
<HeaderTemplate> |
<asp:Label ID="Label46" runat="server" Text="Azienda"></asp:Label> |
</HeaderTemplate> |
<EditItemTemplate> |
<telerik:RadComboBox ID="AziendaRadComboBox" runat="server" DataSourceID="ObjectDataSourceAzienda" |
DataTextField="NomeAzienda" DataValueField="IdAzienda" SelectedValue='<%# Bind("IdAzienda") %>' |
Width="120px" /> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="Label47" runat="server" Width="120px" Text='<%# Bind("Azienda") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn> |
<HeaderTemplate> |
<asp:Label ID="Label48" runat="server" Text="Cultura"></asp:Label> |
</HeaderTemplate> |
<EditItemTemplate> |
<telerik:RadComboBox ID="CulturaRadComboBox" runat="server" DataSourceID="ObjectDataSourceCultura" |
DataTextField="Cultura" DataValueField="IdCultura" SelectedValue='<%# Bind("IdCultura") %>' |
Width="70px" /> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="Label50" runat="server" Width="70px" Text='<%# Bind("Cultura") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn> |
<HeaderTemplate> |
<asp:Label ID="Label49" runat="server" Text="Gruppo"></asp:Label> |
</HeaderTemplate> |
<EditItemTemplate> |
<telerik:RadComboBox ID="GruppoRadComboBox" runat="server" DataSourceID="ObjectDataSourceGruppoUtente" |
DataTextField="Nome" DataValueField="IdGruppoUtente" SelectedValue='<%# Bind("IdGruppo") %>' |
Width="120px" /> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="Label51" runat="server" Text='<%# Bind("Gruppo") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn> |
<HeaderTemplate> |
<asp:Label ID="Label52" runat="server" Text="Stabilimento"></asp:Label> |
</HeaderTemplate> |
<EditItemTemplate> |
<telerik:RadComboBox ID="StabilimentoRadComboBox" runat="server" DataSourceID="ObjectDataSourceStabilimento" |
DataTextField="Denominazione" DataValueField="IdStabilimento" SelectedValue='<%# Bind("IdStabilimento") %>' |
Width="120px" /> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="Label53" runat="server" Text='<%# Bind("Stabilimento") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn> |
<HeaderTemplate> |
<asp:Label ID="Label54" runat="server" Text="Reparto"></asp:Label> |
</HeaderTemplate> |
<EditItemTemplate> |
<telerik:RadComboBox ID="RepartoRadComboBox" runat="server" DataSourceID="ObjectDataSourceReparto" |
DataTextField="Reparto" DataValueField="IdReparto" SelectedValue='<%# Bind("IdReparto") %>' |
Width="120px" /> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="Label55" runat="server" Text='<%# Bind("Settore") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" |
ConfirmText="Do you really want to delete the selected row?" /> |
</Columns> |
<EditFormSettings> |
<EditColumn> |
</EditColumn> |
</EditFormSettings> |
</MasterTableView><FilterMenu EnableEmbeddedSkins="False"> |
</FilterMenu> |
<HeaderContextMenu EnableEmbeddedSkins="False"> |
</HeaderContextMenu> |
</telerik:RadGrid> |
I want to access by code the GridTemplateColumn's HeaderTemplate Labels (for example "Label46") to change the Text property. How can I do this in C#?
Thanks.