dataview sorting

U

Uri Dimant

Hello folks

Can anyone help me with sorting for binding?
VS2005. VB.NET

I have a datagrid view where I display two columns - name of employees with
their positions like
'John' ,1
'Rebecca',2
'Justin',3

As far as good. I have a data table and I perform filter by using data view
object to select only "right" employees. So what if the user wants to change
John's position to 3 then I need to sort the dataview ( I think) with
Rebecca =1, Justin =2, John=3 and later on update to the database. How can I
do that?

Thanks
 
R

rowe_newsgroups

Hello folks

Can anyone help me with sorting for binding?
VS2005. VB.NET

I have a datagrid view where I display two columns - name of employees with
their positions like
'John' ,1
'Rebecca',2
'Justin',3

As far as good. I have a data table and I perform filter by using data view
object to select only "right" employees. So what if the user wants to change
John's position to 3 then I need to sort the dataview ( I think) with
Rebecca =1, Justin =2, John=3 and later on update to the database. How can I
do that?

Thanks

It seems you are binding to an object datasource which is a bit more
difficult to sort than a standard Sql datasource. Here's some videos
in Microsoft's Visual Basic "How do I" series that should help:

http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx#objectbinding
From the title it seems video number 3 is what you need (though you
may need to watch 1 and 2 also)

Thanks,

Seth Rowe
 
C

Cor Ligthert[MVP]

Uri,

A dataview is dynamic, so when you have set the position by Rebeca to 1 etc.
it will be showed in that way.

Cor
 

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