I have an app that you double click on a row in a grid and it brings up an editor to enter/edit date and time worked. The grid is populated via a generic list as it's datasource. After the user edits the time and closes the form, the code to refresh the time cell in the orginal grid does not update. Below is one of the code samples I have tried.
ultraGrid1.ActiveRow.Cells[7].Activation = Activation.AllowEdit;
ultraGrid1.ActiveRow.Cells[7].Activate();
ultraGrid1.ActiveRow.Cells[7].Value = row.TimeSpan.ToString();
What am I missing?
What is the data type of column you want to update?
I tried to assign string value to the string type column and Datetime value to Datetime type using your code and it worked fine.
But when you assign string to datetime type column it gives error.
The datatype of the column is a string and the datatype of value going in is a string. I do not get an error, it just does not update the value. Very strange.
That is strange. FYI.. I tried the code without activating the cell and it works fine. If you do not need to have activate the cell, try assigning value without changing Activation.
Or try activating the cell after setting the value.
When the cell goes into edit mode, it copies the value from the data source into a textbox and displays the TextBox over the cell to allow the user to edit. So setting the Value while the cell is already in edit mode is too late.