473,624 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2011
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("sel ected")

----

Dim boolCol As DataGridBoolCol umn

boolCol = New DataGridBoolCol umn

boolCol.Mapping Name = "selected"

boolCol.HeaderT ext = "Sel?"

boolCol.ReadOnl y = False

boolCol.Width = 30

boolCol.AllowNu ll = False

ts1.GridColumnS tyles.Add(boolC ol)

"Kerry Moorman" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:74******** *************** ***********@mic rosoft.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
3555
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 seem to work. Only the last clicked item appears selected (highlighted) in the display and the return from info_selection only ever contains the last 2 items, rather than all the items I have control-clicked. It's odd, because if I set up the...
0
2067
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 recordset and export to Excel 2) Excel is populated based from an ID (may possible be one or multiple) and renames the worksheet based from the ID 3) the code also format the fields The sample database may be downloaded at:
2
4326
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 how to use this code? please help! http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20862953.html
32
14831
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 ((someString.IndexOf("something1",0) >= 0) || ((someString.IndexOf("something2",0) >= 0) ||
2
2266
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 control already? Now I manage to set only one item to be selected during page load, but there is need to multiple items could be selected for the user. I appreciate very much your help! Thanks.
2
2246
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 the data list I have at the moment is in order, but I would like to have each interval possible, and instead of repeating the row index (the time value) I would like to list it once and then list the items within it (the items associated with...
5
3522
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 selected items of that listbox and display it. can anyone help? Thanks
10
6366
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: dropdownlist.items.findbyvalue("value").selected = true I didnt specify any selected item in the dropdownlist during binding to the datasource. I use dropdownlist.clearselection() but still error occurs. I need information on this. Thanks. Ads
7
3205
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 column need to be a date picker field. I know things will be easier with ASPX datagrid.
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8493
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.