467,092 Members | 1,263 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,092 developers. It's quick & easy.

problem in grid view control

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
  • viewed: 1074
Share:
2 Replies
100+
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
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.

Similar topics

reply views Thread by Jim | last post: by
3 posts views Thread by Elliot Rodriguez | last post: by
4 posts views Thread by Jeff User | last post: by
2 posts views Thread by Smokey Grindle | last post: by
1 post views Thread by sonali_aurangabadkar@yahoo.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.