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
80
How to update UltraWebGrid-data to DB after changing it programmatically
posted

Hi, I have a databound UltraWebGrid which updates values to the DB as it should. It does so when the user change a value in the grid and clicks a simple button for postback. However, I like to suggest some values to the user by changing the value by code, but when I do that - the data is not updated on postback. 

If the user changes another column on the same row that the code changes, only the user changed-column will be saved to the DB.

foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow udr in (UltraWebGrid1.Bands[0].Grid.Rows))
{
udr.Cells.FromKey(
"categoryid").Value = suggestcategoryid();
udr.Cells.FromKey(
"categoryid").DataChanged = true; // I tried with and without this DataChanged-properties
udr.DataChanged = Infragistics.WebUI.UltraWebGrid.DataChanged.Modified;
//UltraWebGrid1.UpdateDBRow(udr); // this updates the data to the database, but then the user never has the option to cancel
}

thanks

Parents Reply Children
No Data