Results 1 to 2 of 2

Thread: Query the data in a datagrid?? Help.

  1. #1

    Thread Starter
    Join Date
    Sep 2000


    Hello everyone,

    Okay, so I have ADODC and Datagrid. The table content is being displayed in the datagrid in a disconnected mode.

    What I want to do is have a combobox with a list of the column names so that user can SORT the data whichever they like. I want to do this by not having to send a new query to the SQL Server, because that is slow. Is it possible?

    In other words, I want the user to be able to SORT and RE-SORT the data that is being shown on the datagrid (as many times as they like), without sending a new query to the SQL Server.

    So I want to be able to do something like:
    "SELECT * FROM datagrid1.something ORDER BY colname"

    Please post any thoughts or ideas, or anything at all. Thanks a lot.


  2. #2
    Lively Member
    Join Date
    Aug 2000
    If you want to sort your grid using the result of your SQL call, and treat this data in isolation (not having to generate another query) then the only thing I can think of is loading the fields/rows returned from your SQL call to an array of UDT. Then sort the UDT Array.

    I do this using with one app, using an unbound MSFlexGrid. I load the Array of UDT with the SQL call result then allow the user to sort the grid. All I do then is remove the records from the Grid, sort the UDT, and then re-build the Grid.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width