469,128 Members | 1,379 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,128 developers. It's quick & easy.

DataView sort does not show in DataGrid

I have a DataTable in a DataSet. A DataGrid is bound to the DataTable.
When I assign a field to the DataTable.DefaultView.Sort property the
order in the DataGrid does not change.

What am I missing?
--
Bill
Nov 16 '05 #1
4 4107
Sorry. I should have added that this is a WinForms app.
--
Bill
Nov 16 '05 #2
Todd:

The DefaultView will send the sort back to its original state, so if you
haven't reset it, then it's not going to do anything. Just to test, call
..Sort on another field, anyone will do just to verify that it's working. If
you've already called so, then let me know.

Cheers,

bill
"Bill Todd" <no@no.com> wrote in message
news:3b********************************@4ax.com...
I have a DataTable in a DataSet. A DataGrid is bound to the DataTable.
When I assign a field to the DataTable.DefaultView.Sort property the
order in the DataGrid does not change.

What am I missing?
--
Bill

Nov 16 '05 #3
Hi Bill,

I reviewed the thread, and find that you have posted a similar problem inn
the same newsgroup.
Subject: Why must I rebind DataGrid to see Sort?
Newsgroups: microsoft.public.dotnet.languages.csharp

You may go and have a check, if you still have any concern on this issue,
please post there and I will follow up in that thread.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '05 #4
Bill:

I just read your top post.. You are binding to the DataTable... Create a
DataView and bind to it instead. The View's sort has No effect on the
datatable's positioning, so if the grid is bound to it, it won't do
anything. Bind to the view instead.
"Bill Todd" <no@no.com> wrote in message
news:3b********************************@4ax.com...
I have a DataTable in a DataSet. A DataGrid is bound to the DataTable.
When I assign a field to the DataTable.DefaultView.Sort property the
order in the DataGrid does not change.

What am I missing?
--
Bill

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin Schmid | last post: by
1 post views Thread by troyblakely | last post: by
13 posts views Thread by Steve | last post: by
4 posts views Thread by Aaron Smith | last post: by
1 post views Thread by dbuchanan | last post: by
5 posts views Thread by enceladus311 | last post: by
reply views Thread by brian_is_online | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.