I have a datawindow that has a computed column. That computed column calls a
global function with the column value and formats the value accordingly. The
format is based on a registry entry I create. If this registry entry gets
modified (say by a user entering a Preference for a different format), is
there a way to "refresh" the datawindow so that the new format is displayed
based on the same column values?
Thanks in advance
I am personally try not to use global functions inside of DataWindow expression.
It is very nice feature that may resolve many problems, but... it is very
unstable.
If you still didn't have problem with that, try evaluate you expression with
global function somewhere in the code ( a kind of Refresh button, or activate
timer event, where check changes in Registry and then re-evaluate expression)
To evaluate expression, use <your computed column name>.Format = <defaultvalue
[tab] DataWindowexpression>
I can't to check it out, but it may work.
Thanks.
On 21 Apr 2004 20:01:38 -0700,
in sybase.public.powerbuilder.datawindow
shawn
"Mark Pare" <mark...@videotron.ca> wrote in message news:<40873592$1@forums-1-dub>...
"Mark Pare" <mark...@videotron.ca> wrote in message
news:40873592$1@forums-1-dub...
Maybe if I give more details:
I have a datawindow with 1 column called length. This datawindow is
populated using ImportFile. The length column is not visible and I have a
computed column which has an expression on it:
f_get_size_format(length)
Now, in f_get_size_format function, it looks at a registry entry to see how
the user would like the size to be displayed in KB or MB. Once the user goes
into Preferences and modifies this registry entry, and I do the
SetRedraw(FALSE/TRUE), it doesn't get refreshed.
As for GroupCalc(), there are no groups in this datawindow so that won't
work.
Any further ideas?
<Philip Salgannik> wrote in message
news:4087ee86.4d9...@sybase.com...
"Mark Pare" <mark...@videotron.ca> wrote in message
news:408d96f0$1@forums-1-dub...
> That didn't seem to work. I issued a dw_1.SetRedraw(FALSE/TRUE) and
nothing.
>
> Maybe if I give more details:
>
> I have a datawindow with 1 column called length. This datawindow is
> populated using ImportFile. The length column is not visible and I have a
> computed column which has an expression on it:
> f_get_size_format(length)
>
> Now, in f_get_size_format function, it looks at a registry entry to see
how
> the user would like the size to be displayed in KB or MB. Once the user
goes
> into Preferences and modifies this registry entry, and I do the
> SetRedraw(FALSE/TRUE), it doesn't get refreshed.
>
> As for GroupCalc(), there are no groups in this datawindow so that won't
> work.
GroupCalc WILL work regardless of the absense of groups...
--
This is a FAQ, read Help, then search
www.groups.google.com/advanced_group_search
pbm_thisusuallydoesnothelp:-))
Philip Salgannik