|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Drop down list not updating on pastbackI have a form with a drop down list bound to a data source which points to table A. There is a details form that queries the current value of the drop down list and presents the data in Table A, with a new, delete, and update button. If I go and delete an entry in table a through the details form, the drop down list still has the deleted entry in it. How to I refresh the data source, force the drop down list to bind to the refreshed data source so the next time somebody picks a value it will be missing the deleted record from the dropdown list? I have attached an example. Regards, Randy. Randy Galliano wrote:
Show quote > Hello, Handle the OnItemDeleted event on the Detailsview.> > I have a form with a drop down list bound to a data source which > points to table A. There is a details form that queries the current > value of the drop down list and presents the data in Table A, with a > new, delete, and update button. > > If I go and delete an entry in table a through the details form, the > drop down list still has the deleted entry in it. > > How to I refresh the data source, force the drop down list to bind to > the refreshed data source so the next time somebody picks a value it > will be missing the deleted record from the dropdown list? > > I have attached an example. > > Regards, > > Randy. There, add the line: DropDownList1.DataBind() -- Riki |
|||||||||||||||||||||||