Results 1 to 3 of 3

Thread: Adding Colums in Datagrid in Run Time (VB 6.0)

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    1

    Adding Colums in Datagrid in Run Time (VB 6.0)

    Hi ...

    Please let me know if it is possible to add a Column to a Datagrid during runtime in VB 6.0.

    Thanks for your help

    Nel

  2. #2
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Indiana
    Posts
    295

    Re: Adding Colums in Datagrid in Run Time (VB 6.0)

    Not sure about datagrid. I always use MSFlexgrid.

    In MSFlexgrid you would add a column like this:

    MSFlexgrid1.cols=MSFlexgrid.cols + 1

    Don't know if datagrid has something similar or not but you can try it.

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Adding Colums in Datagrid in Run Time (VB 6.0)

    Welcome to the forums!

    You can add a column like this...

    Code:
    Private Sub Form_Load()
        DataGrid1.Columns.Add 1
        DataGrid1.Columns.Add 2
    End Sub
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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