Datagrid footer bound dropdownlist

  • Thread starter Thread starter Mohamed Zaki
  • Start date Start date
M

Mohamed Zaki

Dear All,
I've a datagrid in its footer i added a drop down list and some text
boxes and a link button to add new records in the database, however i
populate the dropdown list in the ItemDataBind, when i click over the
linkbutton i got the dropdown list populated again and the selected item is
lost.

Please help.

Regards,
Mohamed
 
I'd suggest you to poulate the dropdownlist if e.item.itemtype =
listitemtype.footer AND !BtnVarClicked
BtnVarClicked is variable that is stored in the session object and is false
when you enter in the itemdatabound when is ispostback and when you submit
the page BUT not from the button in the footer
in the footer onclick item initialize this variable to true

Hope this helps
Regards
Martin
 

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

Back
Top