By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

problem in grid view control

P: 18
hi

in my project a data grid view in which is show a list of employees which i get from database, i add a even double click on any cell , when i click on any cell, i want to display a form to show information of particular employee.
when i click on row i get row index of clicked row through this i get employee id from list and show them.

but problem is here when i arrange a grid view in ascending or descending order
then i click on any row it give me a row index but through this row index when i get employee id through row index which is not this employee, i want to get original employee id through row index

so please any body have solution about this problem
please tell me.
Aug 8 '08 #1
Share this Question
Share on Google+
2 Replies


100+
P: 142
Bind employee id column also to the grid view control . Set the Column width to 0 if you want to hide employee id column. Get the selected employee id by getting value of the correponding cell. Eg: gridEmp[rowIndex,empIdColIndex].Text

Then find out the selected employee details.
Aug 8 '08 #2

P: 18
thanks for answer the question
Aug 11 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.