Can multiple selection of Datagrid items possible? Please help with sample codes

  • Thread starter Thread starter Bill nguyen
  • Start date Start date
B

Bill nguyen

I've been using Datagrid for most of my app's data entry screens. Now I have
the need for users to select multiple rows for printing. Is it possible with
Datagrid items?
Thanks
Bill
 
Bill,

I think multiselect is the default behavior for a datagrid. You should be
able to hold down the Ctrl key and click on multiple rows of the grid. All of
the clicked rows should be selected.

Here is a great source on the datagrid. There is an example of determining
the selected rows:

http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q775q

Kerry Moorman
 
Kerry;
I got to the point where I can get the Datagrid to display boolCol column<
However, I still don't know how:
1. To have this column checked when the row is selected.
2. To figure out which rows have the boolCol checked.

Please see below and tell me what to do next.
Thanks
Bill



Dim cSelect As DataColumn

cSelect = New DataColumn("selected")



----



Dim boolCol As DataGridBoolColumn

boolCol = New DataGridBoolColumn

boolCol.MappingName = "selected"

boolCol.HeaderText = "Sel?"

boolCol.ReadOnly = False

boolCol.Width = 30

boolCol.AllowNull = False

ts1.GridColumnStyles.Add(boolCol)
 

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