Hello,I want to implement functionality to refresh ultragrid without refreshing the row which the user is editing that is the row in which user is entering the value.I am displaying ultragrid by binding the datatable to it.Means no columns added design time but will be displayed as per data in datatable.To refresh the grid I am not using inbuilt refresh method provided by ultragrid but I simply bind the data source again.So when grid is refreshed all rows should be same as when it was first displayed but the row which I was editing should be as it was left.Is there any inbuilt property or method available for that?Or any other way to implement this?
Thank you.
Thank you for reply.That has helped me implement the thing efficiently.
Okay, that makes more sense. But I don't think the grid will do what you want.
The grid commits changes to the underlying data source based on the UpdateMode property. By default, this will updated the data source every time the user leaves a cell. You can change to update only when the user leaves the row, but that's it. Once they leave the row, the underlying data source (the DataTable in this case) is updated with the new value. The grid does not store the original value. Call refresh on the row just tells the grid to get the value from the data source row again, but since that row has already been updated, what you are doing here won't work.
Maybe what you should do is call CancelUpdate on the DataTable. This should cancel all pending changes on the data table and the grid should automatically pick that up.
Hello,
It was my mistake in interpreting the thing.I am sorry about that.The thing is ultragrid is displayed using following code.
objResult = objLoadBlotter.LoadBlotter(Series, lblMaturityValue.Text.Trim());
resBlotterTable = objResult.ResultDataTable;
grdBlotter.DataSource = objResult.ResultDataTable;
Here,grdBlotter is the ultragrid.I have refresh button which refreshes the grid in its original state.For that uptil now what i was doing is simply call the above function again.Which will bind the grid again.Now I have requirement such that I dont want to refresh all the rows of grid again.For that I tried the solution u suggested as below:
{
row.Refresh(Infragistics.Win.UltraWinGrid.RefreshRow.RefreshDisplay);
}
But it doesnt work.That is it does not refresh values entered as it happened in binding the grid again.In my case initially the grid is blank.And user can insert values in it that can be saved by user.What refresh should do is if user has entered some values but not saved then pressing refresh button it should clear all such values.
I may wrong in second case as I am new to Infragistics.Can you outline the exactly what could be the correct code to refresh the each row of ultragrid using refresh method.
drashty said:I tried using row.refresh property it does refresh the value property of each cell not text property which is changed.
I don't understand what this means. How can the value be updated but not the text? This is impossible.
Thank you for your prompt reply.I tried using row.refresh property it does refresh the value property of each cell not text property which is changed.I tried refreshdisplay and fireinitializerow options.But that didnt work for me.I want the values which is entered need to be refreshed.That is the text property of the cell.What is efficient way to do it?And as u said I havent implemented IBindingList for datasource.