CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Posts
    1

    Need help on VB6 datagrid

    I am using a VB6.0 datagrid bound to an ADO data control;
    I cannot modify the database from this grid (it is only used to display a query result).
    My question is, can I remove rows from the grid without touching the underlying database ?
    I've noticed that there is not a "row" collection that I can manipulate, but is there any trick to remove, or to hide some rows (selected by the user) from the grid ?
    Thank you very much


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Need help on VB6 datagrid

    if you use a bound grid, you cannot remove row from it without affecting the db. That what bound means. If you want more flexibility in your programming I don't recommend to use adodc and bound grid at all. Create a recordset and enter dat to the unbound grid. Iprefer MSFlexGrid.

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Need help on VB6 datagrid

    (add this to Iouri answer)...and you will have to code more -this is what unbound controls means-, but you will gain the full control on your grid. I too prefer MsFlexgrid, even if it is not perfect, of course. I suggest you to think about paging your data...

    Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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

Featured