I'm trying to update a cell in my grid programmitacaly but after calling update the value has gone from the cell.
If I don't call update the value is visible in the cell but I get the little pencil edit icon.
The bindingsoure is attached to a query handle and I've set the update mode to OnUpdate.
bindingSource1:HANDLE = lvhQuery.
ultraGrid1:UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode:OnUpdate.
METHOD PRIVATE VOID ultraGrid1_InitializeRow(..........
DEFINE VARIABLE lvrRow AS Infragistics.Win.UltraWinGrid.UltraGridRow NO-UNDO.
IF NOT e:ROW:IsDataRow THEN
lvrRow = e:ROW.
IF UNBOX(lvrRow:Cells["RequestedQty"]:Value) > UNBOX(lvrRow:Cells["RemainingQty"]:Value) THEN
lvrRow:Cells["ColourValue"]:value = lvcRedColour.
Thanks in advance,
Sorted this by re-using my open query to test the required values and update the data source directly.
Obvious really!! :-)
Is there a reason why you didn't just update ColourValue inside the AfterRowFill event of FILL() or FOR EACH whichever you use to build the temp-table? Something like; IF tt.RequestedQty > tt.RemainingQty THEN tt.ColourValue = lvcRedColour.
By the way, I think what you're originally experiencing is bug. The UltraGrid doesn't display the new value correctly if you update the Value property of the cell then calling Update().