loading datagrid with calculated column

  • Thread starter Thread starter touf
  • Start date Start date
Are you using an expression column on the source table or are you adding it
in the grid? If so, an expression column should do it for you (here's a
pretty good discussion on it)
http://www.ondotnet.com/pub/a/dotnet/2003/05/26/datacolumn_expressions.html

If you have to do it in the grid, you can change your calculate logic to
fire whenever the CellChanges or similar event. I think this is probably
the least elegant approach though. Similiarly, you could walk the
underlying table on form load and then change the column value(s)
accordingly, but using the expression is a much cleaner and less error prone
way to address it.

HTH,

Bill
 
Hi William
Thanks for the reply, The expression would be wonderful, but unfortunately
it has too many limitations the value I want to return is the reslut of a
user defined function which is too complex for the expression, I think I'll
use a mixture of doing it in the sp so that it loads correctly and then
changing it with the oncolumnchange for the screen

Thanks
 
Hi

I've figured out how to add a calculated column to a datagrid and update
that column when a specific cell in the row changes, however I cannot figure
out how to populate the calclated column when the form loads or moves from
record to record

any help appreciated

Thanks
 
Back
Top