473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
Nov 21 '05 #1
2 1994
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
"Bill nguyen" wrote:
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

Nov 21 '05 #2
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)

"Kerry Moorman" <Ke**********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
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
"Bill nguyen" wrote:
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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: theoryboy | last post by:
I'm trying to implement multiple selection functionality in a Tix Hlist using a control-click. I've bound control-click to a function that uses selection_set to add to the selection, but it doesn't...
0
by: B | last post by:
Using Access2000, the sample code below is what I have been modifying and working on since the past week and I could not get it to work properly. What I wanted to accomplish: 1) read from a...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
by: Peter | last post by:
Hello! Please, could anyone tell, is it possible to set multiple items to be selected in list control in the code? For example when the web form is loaded three items of 5 are selected in list...
2
by: Antoine | last post by:
I would like to construct my own list of items in a grid/ table/ item list layout but I have a problem. I want to add a sort of index row based on time, such as there might be blank values. Sure...
5
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all...
10
by: ads | last post by:
hi, after binding the dropdownlist to a datasource, ive experience this error "Cannot have multiple items selected in a dropdownlist" after using the code:...
7
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.