Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting row in data grid (VB6)

    Hello everybody,
    I am using VB6. I have an ADO data control on my form which I have successfully connected to an Access file. I also have a data grid control (not a Flex grid) on my form bound to the ADO control which is displaying data from the file. I am trying to provide basic user interface capabilities similar to those found in Excel where the user can copy, cut, paste, add rows and delete rows in the grid. I have been able to achieve cut/copy and paste capabilties but I can't get the add row and delete row feature to work. I would like the user to be able to left click on the left most cell of the of a row (the one in gray that displays an arrow pointing to the selected row when clicked on, which highlights the entire row in black). Then right click displaying a pop up menu (it works to this point) . My question is, how do I add a row ready for data input or delete a row when the ad row or delete row feature is selected in my pop up menu after a row is highlighted. Also, If the add row command is selected, as in Excel, I would like the new row to appear above the highlighted row.

    Thanks Everybody,

    Steve Durgin

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Inserting row in data grid (VB6)

    Is there a reason for using a data grid for this instead of just displaying the view?
    Charlotte

  3. #3
    New Lounger
    Join Date
    Jan 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting row in data grid (VB6)

    Hello Charlotte,

    My objective is to create an interactive Excel style screen that connects to tables in an Access data base. The two controls I mentioned above are giving me that basic capability short the Insert/delete row feature I was asking about. The only reason I am using the Data Grid control is that it seems to work. There is still a lot I need to learn about VB. I am not sure what you mean when you say displaying the view. At this point, I would like to stick with this control and just add the Insert/delete row feature if possible. You have vastly more skill and experience at VB than I do. If there was an easier way to do this I would be grateful for any suggestions you have.

    Thanks,

    Steve

Posting Permissions

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