Datagrid events inside a user control

D

Daniel Armstrong

Hello,

I have a usercontrol that I have built that has a single generic
datagrid. When setting up the inital properties I build the template
columns for the datagrid dynamically so it can display as readonly or
readwrite. The readwrite displays link buttons for edit, update,
cancel and delete buttons.

When I click on a edit link button the page using the usercontrol will
begin it's page load event and then the usercontrol page load event.
However, the edit event is never fired.

I can get the edit event to fire if I bind the dataset to the data
grid on every usercontrol page load. The problem with binding to the
datagrid on every page load is during the update. Whenever, a user
changes data in a textbox control within the datagrid control those
changes are lost due to the databinding on the page load.

If I don't do the databind then the events do not fire and I render a
null datagrid.

How can I retrieve the user's changes during the update command and
have the events fire?

Any help would be appriciated.

Thanks,

Dan.
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top