Hi team,
I have a WDG and a WebImageButton. Both in an UpdatePanel. The WIB is hidden until the user selects a row in the WDG. By pressing the WIB I insert a new row in the DataBase and Hide the WIB. The WIB is hidden, but the WDG still shows the old values. How can I "reload" the WDG by codeBehind of WIB? I tried to ClearDatabaseSource() and the WDG is empty. But after rebind it only shows the headers of the binded table. Is ther a simple way of "refreshing" by codeBehind?
I had to bind it twice, now it works. Thanks.
I need further help. When i pressed the webImageButton I update the DataSource by SQLDataSource.Update(). After this I clear wdg DataSource and set it to the same as before. Then I bind the sqlDataSource and the wdg. The Page refreshes and shows the right rows. But my WebDatGridButtons CommandArgument and CommandName are empty at this time. I set them in des aspx-file this way: <igtxt:WebImageButton ID="WebImageButton4" runat="server" CommandArgument='<%#Eval("Link") %>' CommandName='<%#Eval("ID")+", "+Eval("Datum") %>' oncommand="WebImageButton4_Command" Text="Öffnen"></igtxt:WebImageButton>
Why the Argument and Name are empty?
I cleared the datasource and set it once again. Now the grid updated the gui. But after pushing another button in the grid, now it says "no Object...".
Hello Schnapper,
I am following up to see if this matter has been resolved. If this isn’t the case can you please answer my question? After you update the database do you set the data back to the DataSource property of the WebDataGrid?
Please let me know if I may be of further assistance with this matter.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Thank you for the update. By the sounds of it seems that after you update your database you aren’t pulling the data from the database and updating the grid with it. What leads me to believe this is that on the next postback the data is refreshed and is now correct. After you update the database do you set the data back to the DataSource property of the WebDataGrid?