ASP.NET + GriedView + C# .... cannot select row in grid and get details

Hi,
I have a gridview control (VS2005) on the web page and 3 text boxes below that. I have a class file that will get the Emp data (ID, NAme and City) from table Employees and return the dataset. This dataset is then binded to the grid. Upto this I got it. Now my problems:

1. I cannot select the row in the grid. Why? It is as if the grid has become read-only. Whereas in Winforms, I can move up and down in the grid with the mouse click. How do I achieve this in ASP.NET?

2. I want that when I click on any row in the grid, I should be able to retrieve the data from the data and display the data in the text box. How do I achieve this?

Regards,
MI
vj_miAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ted BouskillSenior Software DeveloperCommented:
Winform grids and Web form grids are very, very, very different.  HTML does not have the complex client side functionality that windows forms have.  Therefore you have to build it in using Javascript or AJAX.

To be honest, you will find that building UI's in web applications is far more difficult and time consuming that windows forms.  Creating a fancy looking UI in web clients is easy, the hard part is complex UI functionality.

The website www.asp.net has some excellent examples of what can be achieved fairly easily with ASP.NET but there is limits.  For example, a modal dialog on the web doesn't really exist.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
YurichCommented:
Hello,

1. Winform controls and Web controls are quite different. There is no free navigation in web data grid as you can experience in web forms. To select any particular row, you have to edit your columns and add a CommandField control ("Select" in your case).

2. Again, you can override OnSelect for your CommandField as above and retrieve any data you need.

Regards,
Yurich
0
Ted BouskillSenior Software DeveloperCommented:
The following company has some good quality grids run with complex JavaScript but you have to tweak them a bit to get decent performance.  If the grids are too large they are exponentially slower.

http://www.infragistics.com/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.