Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Webgrid Using webcombo`s
posted

hi

I have a ultrawebgrid and and on each row I have 5 webcombos placed into the 5 of the Cells which works perfectly.  Each webcombo consists of 2 columns an ID, Description and is bound by a Datatable whicd I create and fill  in code.  I have set the datatextfield to equal the description so it displays the Text in the webgrid cell when a webcombo option is selected and the datavaluefield to be the ID but when ever i run the AddNewRow which is done on click on a button in the aspx page and runs the AddnewRow on server side which works fine, this causes a postback, but on postback all the cells which were webcombos now display the ID and not the Text field and i want the text value displayed not the ID anybody any ideas how i can do this.  My ultrawebgrid is a user control dropped into an ASPX page and the AddNewRow button is not on the user control but on the parent aspx page if this helps.  I must save the values as the ID though but want to display the text value to user not the ID.

thanks  

Parents
  • 40
    Suggested Answer
    posted

    Leigh, I have the exact same problem.

    One workaround is to do a redirect back to the original page once the Update has been processed this will force the grid to reload and display the combos correctly again. An added bonus is that forcing the redirect means that if the user does a refresh of the page they will not issue the postback again and wont get the "resend information you previously submitted" warning.

    However this only works if the update is successful, if it fails for some reason (e.g. due to server side validation) ideally you want to leave the user on the same page, report the error and allow them to correct their inputs before pressing update again. This is exactly my scenario, and like you, the webcombos in my grid are failing to initialize correctly on the postback. One for infragistics I think.

    Thanks

Reply Children
No Data