refresh control

  • Thread starter Thread starter Rubble
  • Start date Start date
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 -
 
I guess you are using the datagrid, if so you have to call myGrid.databind
after you delete.
 
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
 
Back
Top