N
na
I read several postings dealing with adding sorting images, but none of
them has quite the same conditions like mine.
I have a ASPX page that contains a datagrid that dispalys any data
table in my database. This datagrid has AutoGenerateColumns = false,
so in the InitializeComponet() I programmaticly add the desired
columns. The problem is the HeadeText is not necessary the same as the
DataField. So far I am able to add sorting images (up arrow or down
arrow) only to those columns that have the same value in both
properties. I used an invisible web text control to hold the sorting
expression of the clicked column that is set during SortCommand event
In the ItemDataBound event I need to compare this sort expression with
each column's datafield or column's header text then add the sorting
image appropietly. Anyway to add the sorting image to those columns
that have header text different than the underlining datafield? Thanks.
them has quite the same conditions like mine.
I have a ASPX page that contains a datagrid that dispalys any data
table in my database. This datagrid has AutoGenerateColumns = false,
so in the InitializeComponet() I programmaticly add the desired
columns. The problem is the HeadeText is not necessary the same as the
DataField. So far I am able to add sorting images (up arrow or down
arrow) only to those columns that have the same value in both
properties. I used an invisible web text control to hold the sorting
expression of the clicked column that is set during SortCommand event
In the ItemDataBound event I need to compare this sort expression with
each column's datafield or column's header text then add the sorting
image appropietly. Anyway to add the sorting image to those columns
that have header text different than the underlining datafield? Thanks.