TrueDBGrid filtering question

Originally Posted 29 April 2013, 2:23 pm EST

  • Originally Posted 29 April 2013, 2:23 pm EST

    We are evaluating the TrueDBGrid for an application that requires filtering of data. The behavior we are looking for is exactly what the FilterBar tutorial example is doing (step 29 in the tutorial samples for ActiveX)

    From the documentation I have been reading and the ActiveX samples it looks like the actual filtering is not really done by the Grid itself but by the data source. So, for instance the FilterBar example uses an mdb to hold data and sends an SQL statement to filter the get a new recordset.

    The data we'd like to display is not stored in an mdb but comes over the wire. Storing it in an mdb is not an option. Is using XArrayDB the suggested approach? If so, how would the filtering work there? Would we have to use the XArrayDB.Find method to find all and the re-load the Grid.

    Thanks for your help.
  • Reply


    You'd need to use the filter recordset only, to get it filtered the way you want, else for unbound data using XArray etc, you'd need to load the grid by finding the data on your own.

    As such you may use the Winforms TrueDBGrid, which would fulfill all your requirements

  • Reply

    Thanks Gatim.

    Regarding your suggestion that we use WinForms TrueDBGrid. I was looking at the tutorial examples and I see that it uses an OleDataAdapter to load data into the table from an external data source. When I turn FilterBar on, the bar shows up and I can filter.

    Would it work that way if I had code that loaded the grid differently? In other words if I had an 'unbound grid' where I am loading the rows myself. Would turning the FilterBar on automatically give me filtering?

    Thanks for the help.
  • Reply


    If the grid is in UnBoundMode then the filtering won't work. As filtering works on DataView generated by the bounded grid
  • Reply

    I think I know that answer to my next question but I want to make sure it is correct.

    Back to the ActiveX Version of the TrueDBGrid, is there a way to use a fabricated Recordset (i.e. with no connection to any provider) and bind that to the grid? In other words, instead of loading the recordset from a provider via the ADO active x object, we fabricate a recordset object ourselves (with the desired fields and contents) and then use that on the grid.

    Thanks again for your help.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels