Datagrid.EditItemIndex Puzzle

J

Just Me

2003/ASP.NET DataGrid.


Scenrario 1.)

I populate & bind data to the grid only during NOT IsPostback


This displays during the get fine.


I click the Edit Button and the Edit event fires OK

In this I set the EditItemIndex to the row which was selected.

However, it does not render in edit.

I press the Edit button again, and hey presto it does.


-------- Now -----

Scenrario 2.)

If I move the population and binding to the pre-render event (After the Edit
command event ) everything workds first time.



Why it this, can someone explain what is going wrong in scenario 1. )

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top