Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2007

    Unanswered: From database to a datagrid


    I want to move the data in a cartein
    table to a DataGrid.

    What im doing right now is using the:
    dataGridView1.DataSource = dataset.Tables[0];

    And its adding rows and columns automaticly according to the data base.
    (including the headers)

    I dont want to do it like that,
    i want to design manualy the DataGrid at the beginning.
    and then just put the data inside my designed
    datagrid, without changing anything or add anything, and without the Headers.
    (i want to make my own headers)

    How can i do that ?

    [im using visual c# with Pervasive.SQL 8]


  2. #2
    Join Date
    Dec 2001
    Provided Answers: 6
    First question, why would you want to do this?
    As far as the actual problem, you would need to manually create and populate the Columns collection of the DataGridView to set your own headers.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Jul 2007



    I want to do this because i can design my own
    datagrid, its look better, and i want to use my own
    headers, i dont want to use the names of the database fields.

    With the visual design of the DataGrid i can do many things
    very easily without using code, like limiting a cartein column,
    change the colors, the size of each column, etc.

    Why ? what is the problem with doing it like that ?


Posting Permissions

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