Hi I am looking for how to retrieve a GridViewColumn Name from the codebehind.
In my code we were using a conditional to check if the Header matched a certain value, but we are adding tooltips to the column header so now I'm using the following format to set the header, which causes my conditional to never find the column header.
is what I was using
The xaml looks like this:
Can I access the column by the name?
In my code we were using a conditional to check if the Header matched a certain value, but we are adding tooltips to the column header so now I'm using the following format to set the header, which causes my conditional to never find the column header.
if
(e.GridViewDataControl.Columns[i].Header.ToString().Equals(
"Color"
))
The xaml looks like this:
<
telerikgrid:GridViewDataColumn
Width
=
"50"
HeaderCellStyle
=
"{StaticResource GridViewHeaderCellStyle1}"
x:Name
=
"colColor"
>
<
telerikgrid:GridViewDataColumn.Header
>
<
TextBlock
x:Name
=
"txtColor"
Text
=
"Color"
/>
</
telerikgrid:GridViewDataColumn.Header
>
</
telerikgrid:GridViewDataColumn
>
Can I access the column by the name?