Subject Re: [IBO] Calculated fields and TIB_Grid redraw
Author Helen Borrie (TeamIBO)
At 01:57 PM 11-02-02 +0000, you wrote:
>Hi Everyone,
>
>I have a query with some calculated fields, where
>the calculation is done on the client (i.e. with
>the CalculateField event).
>
>My issue is that when some event happens (e.g. keypress)
>I would like to recalculate the fields and have
>a connected grid redraw its current row.
>
>As far as I got, I call
>
>queryOrders.InvalidateCalculatedFields;
>ib_grid1.InvalidateRow(aRow,false);
>
>but the result is not that the new calculated fields
>show up in the grid. However, when I move to the next
>row, the previously selected row is properly redrawn
>and has the new field contents in it.
>
>There is no difference if I call
>
>ib_grid1.InvalidateRow(aRow,TRUE);
>
>instead, so I am out of ideas here.

Call CalculateFields on the Dataset.Fields object? Otherwise, the soonest CalculateFields will get called is when the calculated fields become invalid through posting, i.e. when you scroll the dataset (I think..!). Try it, anyway.

regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com