Results 1 to 12 of 12

Thread: Visual Basic 6 DataGrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    6

    Visual Basic 6 DataGrid

    Hi,

    I am working in VB6.I have used Third Party Sheridon controls like SSGrid,SSCombo before,which has sufficient properties.But now i want to move to Windows7.For that i dont have serials for that third party and they will not provide support that product now a days.Rebind and Refresh property not works in inbuilt VB6 datagrid.I need a another third party Grid and Combobox for VB6.Please anyone suggest me the component link..eighter free or cost not a problem..

    The Grid should have DataSource property and Rebind property..

    Thanks in Advance,
    Last edited by si_the_geek; Aug 26th, 2010 at 11:18 AM. Reason: removed email address so it isn't picked up by spam bots - other members can contact you via the forums

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    6

    Re: Visual Basic 6 DataGrid

    kannan,

    Thanks for response,
    I have tested MSFlexGrid also.But its like matrix code to connect Grid with ADODC.I want to connect with DataSource property simply..Please suggest me any other with DataSource property,and should work for Rebind and Refresh.

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Visual Basic 6 DataGrid

    Hi kannan... Welcome to the forums....

    You can also check these sites for free third party controls:

    ....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Visual Basic 6 DataGrid

    The FlexGrid controls are meant as "display" controls (i.e. they're output-only).

    The DataGrid control is actually quite powerful and can save you lots of coding when you want to offer users a spreadsheet-like "table view" of data. There are also the companion ADO Data, DataList, DataCombo, and DataRepeater controls. MSHFlexGrid is usually considered a part of this group as well because it offers the same powerful ADO data binding capabilities. This group of controls was meant to replace the older Sheridan controls.

    In all of my tests these work just fine in Vista and Win7.

    Just be sure to avoid the more ancient DAO-oriented controls that were a holdover from VB4/5 to make porting old programs to VB6 easier. Those are named things like DBList and DBCombo, the old DBGrid isn't normally installed with VB6 .

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Visual Basic 6 DataGrid

    Quote Originally Posted by dilettante View Post
    The FlexGrid controls are meant as "display" controls (i.e. they're output-only)...
    Absolutely not, they are not read-only - you can easily use either (especially Hierarchical grid that can be bound to a recordset) to manipulate data.
    However, data bound controls are not something commercial app would use - they give nothing more than a good headach.

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Visual Basic 6 DataGrid

    Quote Originally Posted by RhinoBull View Post
    Absolutely not, they are not read-only - you can easily use either (especially Hierarchical grid that can be bound to a recordset) to manipulate data.
    However, data bound controls are not something commercial app would use - they give nothing more than a good headach.
    I disagree. A user cannot enter data or update values using the FlexGrids. A programmer is forced to "hover" another control over the top of the grid to simulate this at significant expense of hand coding.

    The DataGrid control automates this so direct entry is possible with no extra code.


    Many people have trouble with data binding and run from it and cast aspersions upon it. To each his own, but this thread was specifically asking for help with bound controls.

  8. #8

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Visual Basic 6 DataGrid

    Simple self-contained example showing rebinding of the data source.
    Attached Files Attached Files

  10. #10

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    6

    Re: Visual Basic 6 DataGrid

    Quote Originally Posted by dilettante View Post
    The FlexGrid controls are meant as "display" controls (i.e. they're output-only).

    The DataGrid control is actually quite powerful and can save you lots of coding when you want to offer users a spreadsheet-like "table view" of data. There are also the companion ADO Data, DataList, DataCombo, and DataRepeater controls. MSHFlexGrid is usually considered a part of this group as well because it offers the same powerful ADO data binding capabilities. This group of controls was meant to replace the older Sheridan controls.

    In all of my tests these work just fine in Vista and Win7.

    Just be sure to avoid the more ancient DAO-oriented controls that were a holdover from VB4/5 to make porting old programs to VB6 easier. Those are named things like DBList and DBCombo, the old DBGrid isn't normally installed with VB6 .
    MSHFlexGrid doesnt have rebind property.please suggest me with Rebind,Refresh property.Thanks

  11. #11

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    6

    Re: Visual Basic 6 DataGrid

    Quote Originally Posted by dilettante View Post
    Simple self-contained example showing rebinding of the data source.
    Thank You so much for response..


    ya ur code works fine.but if we try to delete one row through a command button it will not rebind.I tested that.please help me further

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Visual Basic 6 DataGrid

    It is hard to guess what you mean by deleting through a command button. Are you calling the Delete method on the same Recordset? Doing a Delete through another Recordset? Another Recordset on another Connection?

    When I add an extra button and the code:
    Code:
    Private Sub Command1_Click()
        rsTable.Delete
        DataGrid1.Refresh
    End Sub
    Everything works fine here.

    You normally only need ReBind when the underlying data source changes. Just call Refresh to update the displayed rows.

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