Selected Rows in Datagrid?

  • Thread starter Thread starter Lars Netzel
  • Start date Start date
L

Lars Netzel

Hello!

I have a Datagrid with a Dataview as datasource.

The user is suppose to select a bunch of rows in the grid and then do some
things with those... (copy and paste)

How do I get all the selected Rows in a datagrid?

in the BindingContext there's only a "Current" and that is only one... (with
the arrow on that row in the grid) but I can with Mouse and CRTL actually
make several rows in the grid Blumarked which gives me an idea of that they
are selected in some way.. how do I get to those?

Best Regards/
Lars Netzel
 
Hi,

For x As Integer = 0 To Me.BindingContext(DataGrid1.DataSource).Count - 1

Debug.WriteLine(String.Format("{0} {1}", x, DataGrid1.IsSelected(x)))

Next



Ken

-----------------------

Hello!

I have a Datagrid with a Dataview as datasource.

The user is suppose to select a bunch of rows in the grid and then do some
things with those... (copy and paste)

How do I get all the selected Rows in a datagrid?

in the BindingContext there's only a "Current" and that is only one... (with
the arrow on that row in the grid) but I can with Mouse and CRTL actually
make several rows in the grid Blumarked which gives me an idea of that they
are selected in some way.. how do I get to those?

Best Regards/
Lars Netzel
 

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

Back
Top