Click here to Skip to main content
12,358,418 members (29,499 online)
Click here to Skip to main content

Tagged as



Selected datagridview row eror

, 9 Nov 2012 CPOL
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
2 - 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 (Senior)
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.

You may also be interested in...

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