DBGrid in Visual Basic 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sadhsivamb
    New Member
    • Apr 2006
    • 1

    DBGrid in Visual Basic 6.0

    Dear Sir/Madam,

    Now I am developing a software using Visual Basic 6.0. recently get practiced on VB. I need help from you. My question is how to set DBGrid or Any Grid Conrol should have an order property which is for a small example when i am clicking a Name row(directly on Grid), that datas and relevent datas should be ordered.

    please help.

    thanks in advance.
  • CaptainD
    New Member
    • Mar 2006
    • 135

    #2
    MSFlexGrid and MSHGrid that come with VB6 do not have that built in. I'm not sure if this would be the fastest way but I would set it up so that when the grid is clicked, on row 0 (Top row) it would give me the column thus, what they want to sort by and then requery with that as the sort order.

    On the other hand, here is a free "S-Grid" that has t built in if you want to change grids.

    Comment

    • rowin
      New Member
      • Jan 2006
      • 15

      #3
      I have done a similar thing in C++ Builder.
      Would you be able to convert the code to VB?

      Comment

      • CaptainD
        New Member
        • Mar 2006
        • 135

        #4
        I have done a similar thing in C++ Builder.
        Did you create the whole grid that sorts? If so, you should be able to compile and reference it for use in VB.

        As far as writing code to sort the flex grid, I can write code in VB to populate and sort the grid through the recordset. I'm not familier with C++

        Comment

        • rowin
          New Member
          • Jan 2006
          • 15

          #5
          Originally posted by CaptainD
          Did you create the whole grid that sorts? If so, you should be able to compile and reference it for use in VB.

          As far as writing code to sort the flex grid, I can write code in VB to populate and sort the grid through the recordset. I'm not familier with C++

          What I have done is that when I click on a column in the DBGrid, the rows in it are ordered.

          Comment

          • CaptainD
            New Member
            • Mar 2006
            • 135

            #6
            After researching your question I found out you can sort the MSFlexGrids

            Here is an example.



            I've been told you could not sort them so I did not research it. Sorry for the bad info!

            Comment

            Working...