Subject | Re: [IBO] RefreshOnParamChange |
---|---|
Author | sdbeames |
Post date | 2002-02-06T09:59:45Z |
--- In IBObjects@y..., Geoff Worboys (TeamIBO) <geoff@t...> wrote:
query is filtered, or not, by external actions that change the
parameters fed to its' select proc. If I have, say, just one row
showing & focused because of the filtering, and then reduce the
filtering by changing the parameters so that I get more rows showing,
then when using Refresh() & raKeepDataPos, the previously focused row
stays focused as more rows return. But if I try this whilst relying
on RefreshOnParamChange, then the first row always becomes the
focused row.
try / __finally / EndUpdate etc, and while it all works, it does seem
to have this problem respecting the RefreshAction setting, as I've
described.
I have no big problem with using Refresh() after changing the
parameters instead, but I wondered why the other way was better (&
the default), and if there would be a penalty of some sort that I'd
just have to live with, (unless the RefreshAction problem could be
fixed). I'm sure there's a very good reason why it's used so much in
Jasons' code, rather than using Refresh(). On the other hand, while I
like to know if I'm wrong, maybe it's not worth worrying about too
much. Life's too short!
Cheers,
Steve
> > I think I'm correct in saying that the default TIB_Query settingof
> > RefreshOnParamChange = true, causes the RefreshAction setting tobe
> > ignored. Could this be changed? (V4.2.Fp)that
>
> It should not cause RefreshAction to be ignored - although given
> the result set is presumably completely changed, any other actionI think I can see what you're saying, but in one of my grids the
> than Open is probably unreliable.
query is filtered, or not, by external actions that change the
parameters fed to its' select proc. If I have, say, just one row
showing & focused because of the filtering, and then reduce the
filtering by changing the parameters so that I get more rows showing,
then when using Refresh() & raKeepDataPos, the previously focused row
stays focused as more rows return. But if I try this whilst relying
on RefreshOnParamChange, then the first row always becomes the
focused row.
> > Given that there is a certain amount of extra code (BeginUpdate(),this
> > EndUpdate())to be written when using RefreshOnParamChange and you
> > only want one refresh to occur (when changing multiple params,
> > would be the norm, I'd imagine), it seems simpler to havesetting.
> > RefreshOnParamChange default to false, use a TIB_Query->Refresh()
> > call when needed, and keep the benefit of the RefreshAction
> > Or have I missed something again?you
>
> It may help if you explain exactly what your problem is. How are
> changing parameters?I used the standard code you provided last week for BeginUpdate /
>
> RefreshOnParamChange does nothing with BeginUpdate/EndUpdate itself,
> when it is turned on every parameter change event will result in a
> refresh. If you want to change multiple parameters at a time you
> should provide the BeginUpdate/EndUpdate yourself.
try / __finally / EndUpdate etc, and while it all works, it does seem
to have this problem respecting the RefreshAction setting, as I've
described.
I have no big problem with using Refresh() after changing the
parameters instead, but I wondered why the other way was better (&
the default), and if there would be a penalty of some sort that I'd
just have to live with, (unless the RefreshAction problem could be
fixed). I'm sure there's a very good reason why it's used so much in
Jasons' code, rather than using Refresh(). On the other hand, while I
like to know if I'm wrong, maybe it's not worth worrying about too
much. Life's too short!
Cheers,
Steve