By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,855 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,855 IT Pros & Developers. It's quick & easy.

Multiple rows selected in dataGridView is not working

P: n/a
GS
Hi,

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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.