Results 1 to 3 of 3

Thread: Filling the Datagrid

  1. #1

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Filling the Datagrid

    Here is my code to set the columns of the datagrid control.
    VB Code:
    1. dtaGrid.AllowAddNew = False
    2.     dtaGrid.AllowDelete = False
    3.     dtaGrid.AllowUpdate = False
    4.     dtaGrid.Columns.Item(0).Width = 200
    5.     dtaGrid.Columns.Add(1).Caption = "Case ID"
    6.     dtaGrid.Columns.Add(2).Caption = "Case Status"
    7.     dtaGrid.Columns.Add(3).Caption = "Case Type"
    8.     dtaGrid.Columns.Add(4).Caption = "Case Sub Type"
    9.     dtaGrid.Columns.Add(5).Caption = "Branch"

    How do I add the rows to this grid control?

    Cheers,
    Abhijit
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Filling the Datagrid

    I think that you have to link it to a data source. I couldn't find any way to address a single cell when I was trying to change the color of a cell.

  3. #3

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Angry Re: Filling the Datagrid

    David,
    Thanks for replying. However if I attach it to a datasource, whats the purpose of having this mechanism to add the column names. I am going through the documentation and haven't found anything yet.

    I have another option - to use a flexgrid, but that option is not a wise one. We will be moving to .NET shortly and in that case, the flexgrid doesn't upgrade.

    Cheers,
    Abhijit
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

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