Click here to Skip to main content
12,893,027 members (59,209 online)
Click here to Skip to main content

Tagged as


Posted 9 Nov 2012

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 2:45 Available Gautam Raithatha
Updates in content. 1 changes had been made.
1 No 9-Nov-12 2: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...

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