Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Tagged as

Go to top

Selected datagridview row eror

, 9 Nov 2012
u can check for Header row in CellClick event and dont process for header row. Header row has index -1. so try this:private void gv_CellClick(object sender, DataGridViewCellEventArgs e){ if (e.RowIndex != -1) { //Your code }}



Compare Revision Minor Date Status Editor
publicly available No 9-Nov-12 8:45 Available Gautam Raithatha
Updates in content. 1 changes had been made.
1 No 9-Nov-12 8:03 Available Gautam Raithatha


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Gautam Raithatha
Software Developer
India India
I am a B.E. Computer Engineer and a native of Rajkot, Gujarat, India. Currently I am working as a Software Engineer in a private IT firm in Ahmedabad.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 9 Nov 2012
Article Copyright 2012 by Gautam Raithatha
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid