Datagrid - what column is it sorted by?

G

Guest

How do I determine what column the user sorted the textbox by and wether its ASC or DESC? (they click the header and a little arrow shows up.

When they leave the form, I want to pick up what column they sorted by so when they come back, I can sort that column for them
I already have the filter piece on the dataview and move to the row they were on by useing Me.DataGrid1.CurrentRowIndex = x.

Please help. I have spent hours trying to figure this out
Thanks very much for your time.
 
C

Chris Botha

Sean, it is pretty much the same as the filter piece, just grab the value of
the Sort property of the DataView and when they return to the form stick the
value back into the Sort property - it will sort it the way it was sorted,
the correct field and also ASC or DESC.

Sean Davis said:
How do I determine what column the user sorted the textbox by and wether
its ASC or DESC? (they click the header and a little arrow shows up.)
When they leave the form, I want to pick up what column they sorted by so
when they come back, I can sort that column for them.
I already have the filter piece on the dataview and move to the row they
were on by useing Me.DataGrid1.CurrentRowIndex = x.
 

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

Top