473,382 Members | 1,084 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,382 software developers and data experts.

Multiple rows selected in dataGridView is not working


I have dataGridView with MultupleSelect property enabled and I programmatically set rows to be Selected based on checkbox being selected in DataGrid (code below). Issue is that it resets Selected rows each time I select a new row. What am I doing wrong?

private void dgrResults_CellContentClick(object sender, DataGridViewCellEventArgs e)
if (((DataGridView)sender).CurrentCell is DataGridViewCheckBoxCell)
dgrResults.Rows[e.RowIndex].Selected = true;

Feb 8 '06 #1
0 1544

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

Similar topics

by: David | last post by:
I was looking at this article, but it doesn't work for me. http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.multiselect.aspx I can not select multiple rows in my...
by: steve | last post by:
Hi All I have a datagridview bound to a datatable Due to the use of touch screens I need to be able to scroll the grid in code in response to a button click i.e each button touch (click) will...
by: manjub | last post by:
Hi, I am trying to add ability to delete multiple rows from a DataGridView in my application. When user selects multiple rows and presses delete button, I want to show a message asking to user...
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
by: mdfayazi | last post by:
I am using dataadapter to Add,Update,Delete rows in a datagridview.Update and delete are working but while adding a rows the problem comes.When I add more than one row only first row values are...
by: frostbb | last post by:
Greetings: Working on a VS2005 C# program. I have a DataGridView control that is bound to dataviews generated by various database queries. i.e. the user enters search criteria and the query...
by: =?Utf-8?B?TU1TSkVE?= | last post by:
How to let user delete multi rows from the BindingSource while the SelectionMode Property set to RowHeaderSelect I have in my program datagridview bound it to sql table Throw Bindingsource To...
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
by: Gun Slinger | last post by:
Hi guys, I have a quick question which i have pondered for a little while. I'm not sure if its even a good idea (so maybe advice on whether or not to do it would be helpful as well). I want to...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.