S
sloan
Ok, I've gotten somewhat handy with the new GridView.
And I have it bound to a business object datasource, via the
ObjectDataSource.
Lets say I have 3 databound columns
EmpID, LastName,FirstName
I have it working where.... If I click the Header, that it will sort based
on the Header I click.
I even have DESC working if they click the same column header twice.
...
Now, let's say I want to NOT use the Headers. I want to setup 3 ddl (drop
down lists) ...something like this:
Sort By: LastName
(then by): FirstName
(then by): EmpID
And then sort the data.....so I get a sort string like this
"LastName,FirstName,EmpID"
To add some more info, lets say I have 450 employees, and my pagesize/count
is set to 100.
(Aka, 5 pages of data..to hold 100,100,100,100, and 50 employees)
My example is trivial, my data is more complicated than this, fyi.
Which/What object handles the sorting from then on out?
I specifically have a strongly typed DataSet as my source for my
ObjectDataSource, because I didn't want to write a super complicated
IComparer.
Can I sort the dataset.... then rebind it to the ObjectDataSource?
Aka, how can I sort when I want to setup the sort ..outside of the GridView
itself.
....
Thanks.
And I have it bound to a business object datasource, via the
ObjectDataSource.
Lets say I have 3 databound columns
EmpID, LastName,FirstName
I have it working where.... If I click the Header, that it will sort based
on the Header I click.
I even have DESC working if they click the same column header twice.
...
Now, let's say I want to NOT use the Headers. I want to setup 3 ddl (drop
down lists) ...something like this:
Sort By: LastName
(then by): FirstName
(then by): EmpID
And then sort the data.....so I get a sort string like this
"LastName,FirstName,EmpID"
To add some more info, lets say I have 450 employees, and my pagesize/count
is set to 100.
(Aka, 5 pages of data..to hold 100,100,100,100, and 50 employees)
My example is trivial, my data is more complicated than this, fyi.
Which/What object handles the sorting from then on out?
I specifically have a strongly typed DataSet as my source for my
ObjectDataSource, because I didn't want to write a super complicated
IComparer.
Can I sort the dataset.... then rebind it to the ObjectDataSource?
Aka, how can I sort when I want to setup the sort ..outside of the GridView
itself.
....
Thanks.