adding name to the row and column of datagridview in windows c# application


hi,

how can i add name to the row and column of a datagridview in a windows c# application through dataset. actually i want to creat the matrix view using dataset. can anyone help me out

thanks & regards

Isaiyavan Babu




Answer this question

adding name to the row and column of datagridview in windows c# application

  • WXS123

    Hi again,

    now how will i do it with asp.net gridview

    as i tried with the above codes but i received the error : " index out of scope"

    thanks & regards

    Isaiyavan



  • dalila

    Hi,

    Change the "ColumHeader" by modifying DataGridView1.Columns[number].HeadText

    Change the ">" cell display by modifying DataGridView1.Rows[number].HeadCell.Value

    That will do what you want. Thank you



  • JasW

    thank u Figo Fei

  • pitks

    Hi,

    DataGridView is different from GridView in asp.net.

    GridView1.HeaderRow.Cells[number].Text = "header";

    And for more solutions about it you'd go to asp.net forum.

    Thank you



  • Deepa7476

    Hi,

    What do you mean by name of row and column, could you explain the exact thing you want to do

    Thanks



  • Insignia

    hi i want the datatable look like the following

    ColumnHeader1

    ColumnHeader2

    >

    Somevalue

    Somevalue

    >

    Somevalue

    Somevalue

    >

    Somevalue

    Somevalue

    here how can i set the columnHeader Name and replace ">" symbol with row 1, row 2, row 3.
    i need to take the data of the columnheader Name from a database table, and row ">" name from another database table.

    Thanks & Regards
    Babu


  • adding name to the row and column of datagridview in windows c# application