Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Sorting again (http://www.velocityreviews.com/forums/t381621-sorting-again.html)

na 10-31-2006 12:20 AM

Sorting again
 
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.



All times are GMT. The time now is 12:09 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.