Board index » cppbuilder » See effect of filter change in TDBGrid

See effect of filter change in TDBGrid

Sorry if this is not the most appropriate forum but none seem close.

I have a dataset linked to a TDBGrid. The dataset contains several types of
data. I want to be able to display just one type of data in the grid at a
time, depending upon the selection from a combo box.

I can change the dataset's filter OK. However, the grid is not re-drawn (it
still shows the data for the previous filter value) until I click somewhere
in the grid.

I have tried Dis/EnableControls(), TTable::Refresh(), TDBGrid::Refresh,
TDBGrid::Invalidate, setting TDBGrid::SelectedIndex, etc, etc. Nothing seems
to redisplay the grid contents until it is entered by the user.

Any ideas, please?

Using BCB4 on Win98.

David Pedley    Wokingham, UK

 

Re:See effect of filter change in TDBGrid


: "David Pedley" <david_ped...@compuserve.com> wrote:

Quote
>I have a dataset linked to a TDBGrid.

David, this here isn't really where the people who know about your
database or database components problem hang out. If you don't get an
answer to your question in this group within the next couple of days, or
if you want to respond to an answer, a much better place probably is the
group

  news:borland.public.cppbuilder.database.desktop

To learn more about this server and the groups that it carries, have a
look at http://www.borland.com/newsgroups/

Generally, it is always best to post to the single most appropriate group.

Thanks!

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
TeamB - http://www.teamb.com/

Re:See effect of filter change in TDBGrid


Hi, David

I din't find better method and I use these functions together:

       TTable::Close();
       TTable::Open();

resp.

       TDBGrid::Close();
       TDBGrid::Open();

                                Petr

Quote
David Pedley wrote:

> Sorry if this is not the most appropriate forum but none seem close.

> I have a dataset linked to a TDBGrid. The dataset contains several types of
> data. I want to be able to display just one type of data in the grid at a
> time, depending upon the selection from a combo box.

> I can change the dataset's filter OK. However, the grid is not re-drawn (it
> still shows the data for the previous filter value) until I click somewhere
> in the grid.

> I have tried Dis/EnableControls(), TTable::Refresh(), TDBGrid::Refresh,
> TDBGrid::Invalidate, setting TDBGrid::SelectedIndex, etc, etc. Nothing seems
> to redisplay the grid contents until it is entered by the user.

> Any ideas, please?

> Using BCB4 on Win98.

> David Pedley    Wokingham, UK

Other Threads