The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Select Multiples cells in Datagridview
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Tchala BPosted Jun 19, 2017, 2:25 PM
Thanks for this nice article but am having some issue somewhere in my project and its related to your article. My code currently allows a user to to select one item whose report is to be generated.I now want to upgrade it so that a user can select more than one item so that more than one report can be generated.I have already set the multiselect property to true,selection mode to cellselect and am now stuck. if (e.RowIndex < 0) return; this.EmpId = Convert.ToInt32(this.dgvPrint.Rows[e.RowIndex].Cells["Empid_Print"].FormattedValue); this.lblEmpPrint.Text = this.dgvPrint.Rows[e.RowIndex].Cells["Empname_Print"].FormattedValue.ToString(); this.btnPrint.Enabled = true; } The above code works for a single cell click,how do i modify it to work with multicellselect