Sort datagrid

S

sam

Hello Group,
I have a datagrid which needs to be sorted but the column
headers should not be clickable on certain conditions( say on the
"print version" of the page). The simple piece of code used is :

dgwip.allowsorting=true
dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind()
**dgwip.allowsorting=false

Since, I need to sort the datagrid and disable the column headers
after the sort, I disable the allowsorting property after the databind
but that does not seem to do the job. Not sure, how to go about it.

Any help would be great!!


Thanks,
Sam.
 
E

Eric

From your description, the special conditions that preclude sorting also
require a post back or new page. If you can track when this is true, then
you can disallow sorting. For example, the "Print Version" is obvoiusly a
special case rendering of the page, so you can track it and disallow sorting
when it is true.
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top