I have a customized grid gridview.my capable of sorting for each column with just one click in the header without any settings and overloads, such as sorting, etc. user (programmer). (I do this successfully and work fine) users (programmers) can add each column to grid.such as a template field, hyperlink, boundfield .... for sorting, I have to access the data fields of the columns. I can access the boundfield column with this code. I can access the data fields and the header and ... Sample:
for (int j = 0; j < this.Columns.Count; j++)
{
BoundField bf;
bf = this.Columns[j] as BoundField;
if (bf != null)
{
string ht = bf.HeaderText;
string df = bf.DataField;
}
}
but I can access the controls in templateField.such as a ColumnBound. Sample:
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
"" (Bind ( "" ) Eval ( "" )).
?
: , ( "Label1" ) .