how to find select row event

Posted by Shanky11 under VB.NET on 3/4/2013 | Points: 10 | Views : 1301 | Status : [Member] | Replies : 1
i m attaching image og griedview
in this i want user can select a row and click on edit button and get values of all cell of particuar row in textboxes in another form
for that i have the code on griedview_cellclick
but pblm in this is when i click row contaning data its work ok but when i click on clolumn name in header section it shows errror
how can we remove this
------------error :-Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


Posted by: Ajay.Kalol on: 3/4/2013 [Member] Starter | Points: 25

You should put if condition for that like

if(rowindex > 0)

// Code to do


Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response