Hello,
When i want to modify a value in a cell the DataGrid will update the DataSource but i don't want that...
And i can't set the DataChanged attribute of the Cell or the ModifiedRow of the row to false
I need help, i'm on this problem since yesterday i tried everything i can i dont know how to do...
Sorry for the poor english i'm french and it's my first post here.
Thank you very much for answers.
You could try setting the 'UpdateMode' property of the 'WinGrid' control like this:
ultraGrid1.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnUpdate;
You could also take a look at the following link:
http://help.infragistics.com/NetAdvantage/WinForms/2011.2/CLR2.0/?page=Infragistics2.Win.UltraWinGrid.v11.2~Infragistics.Win.UltraWinGrid.UpdateMode.html
Please do not hesitate to contact us if you need any additional assistance.
Thank you very much for your help i desperate... I already try this and it don't work. I don't know if you really understand what i mean.
i'll show you a little exemple of my problem:
for (int i = 0; i < MyDataGrid.Rows.Count; i++){
MyDataGrid.Rows[i].Cells["column"].Value = "new Value";
}
After something like that all the row will be updated in the DataSource but i don't want that! i only want to update rows modified by the user during the execution.
i'm searching for something who will disable the event who set the DataChanged to true or something like that.
Thanks for your help
The UltraWinGrid is a DataBound control and like all DataBound controls, it continuously keeps itself in synch with the data source. There is no way to stop this.
Keep in mind that the grid only updates the local data source, though. It will never update the back end (the database) directly.
If you don't want the grid to alter your local data source data, then you need to bind the grid to something else, like perhaps a copy or clone of that data.
Thank you very much for your help!
i have a herited class of the datagrid i will try to modify it
hi,
I have ultrawingrid. i am changing cell value and i have summary at the botton of screen. I like to update summary as soon as user changes value in cell .
How is it possible? i try this code in cell change event of grid but didn't work.
Me.ultragrid.displaylayout.refreshsummaries()
This is very tricky and it depends on a lot of different factors. If you have a cell that the user can type into, then updating the summary as the user types probably is not feasible.
The summary is calculated when the edit is committed to the data source. But the edit cannot always be committed on every keystroke, because something the use might be in the middle of typing something that isn't yet valid.
You could try updating the cell on every keystroke using the CellChange event and calling the grid.ActiveRow.Update method. But this could raise an error message if what the user types is invalid.