Hi,
I have one situation where i want to find the header of Grid and apply the custom css. In grid I have following column and want to get the header of this column in code
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<telerik:GridTemplateColumn UniqueName="AssociateColumn">
<ItemTemplate>
<asp:HyperLink ID="Lnktest" runat="server" Text="test"></asp:HyperLink>
</ItemTemplate>
</telerik:GridTemplateColumn>
I have follwoing code to get the header and i am able to get that for other columns but not for this above column.
if (e.Item is GridHeaderItem)
{
GridHeaderItem item = (GridHeaderItem)e.Item;
foreach (GridColumn col in GridAttorney.MasterTableView.Columns)
{
if (col is GridEditCommandColumn || col is GridButtonColumn)
{
item[col.UniqueName].CssClass = "gridsBlankheadercolumn";
}
}
}
Can anyone tell me How to get this Column header in this above code ? Also please see the attached screenshot for better understanding.
Thanks,
--Jai
I have one situation where i want to find the header of Grid and apply the custom css. In grid I have following column and want to get the header of this column in code
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<telerik:GridTemplateColumn UniqueName="AssociateColumn">
<ItemTemplate>
<asp:HyperLink ID="Lnktest" runat="server" Text="test"></asp:HyperLink>
</ItemTemplate>
</telerik:GridTemplateColumn>
I have follwoing code to get the header and i am able to get that for other columns but not for this above column.
if (e.Item is GridHeaderItem)
{
GridHeaderItem item = (GridHeaderItem)e.Item;
foreach (GridColumn col in GridAttorney.MasterTableView.Columns)
{
if (col is GridEditCommandColumn || col is GridButtonColumn)
{
item[col.UniqueName].CssClass = "gridsBlankheadercolumn";
}
}
}
Can anyone tell me How to get this Column header in this above code ? Also please see the attached screenshot for better understanding.
Thanks,
--Jai