refresh control

R

Rubble

Hello,

Ive been having issues with a control I built. I created a simple
user control that displays a grid. I added some functionality so that
when a user clicks on one of the items in a column, it deletes that
row. But the page just refreshes and the control sees a postback and
just remains the same...still displaying the row that was deleted. If
I hit refresh, the row disappears like intended.

How can I fix this so that it refreshes and removes the row on
clicking the delete button?

Thanks!

- B. Rubble -
 
R

Raterus

I guess you are using the datagrid, if so you have to call myGrid.databind
after you delete.
 
R

Rubble

Yeah, sorry, I should have mentioned it is the datagrid control. The
only issue I have is that I have several grids in my control, and I
only load the one that the user selects on the page. So when it comes
time to bind the data again, Im not sure which one on the control to
bind.

Id like to store something in the viewstate of the parent page to tell
me which grid to rebind...but I cant seem to read the viewstate of the
page from the control. Am I doing something wrong?


Thanks for the help!
x B. Rubble x
 

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,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top