Sorting again

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top