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 Update single rows by elemts (form) outer the wdg, so i have to update database out of wdg. After Updating I do sqlDataSource.DataBind() and also wdg.DataBind, but nothing goes on. If i change the selection after updating the database, the grid shows the new values. there should be a way to update the gui in a same way.
Hello Schnapper,
Thank you for the update. If you are updating your data in your database you would then want to retrieve it from your database assign it to the datasource of the grid and bind it. Do you currently retrieve your database after updating it? How you doing the rebinding of the gird? Is there a reason you are updating your database then trying to update the grid instead of updating your grid and using that to update your database?
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Hi,
a: tried it with enabled and disabled.
b: sqlDataSource1.UpdateParameters.Clear();sqlDataSource1.UpdateCommand = "Update Table Set Date = '"+DateTime.Now.ToShortDateString()+"' WHERE Document = 'XXX'";
sql.DataSource.Update();
c: <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Font-Size="Medium" Height="310px" oninitializerow="WebDataGrid1_initializeRow" Width="356px">
Thank you for contacting Infragistics!
We received your support request concerning inserting a row into the WebDataGrid from a button click, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I have the following questions;
a.) Do you have ajax enabled on the WebDataGrid?b.) How are you adding the row to the?c.) What is your basic setting for the WebDataGrid?
Looking forward to hearing from you,