datagrid column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • summiyashaheen
    New Member
    • Sep 2007
    • 13

    datagrid column

    how can i read the values of one column of datagrid in vb.net desktop application?
  • mohitkatariya
    New Member
    • Apr 2007
    • 26

    #2
    Let g is GridView
    int32 j;
    for (Int32 i = 0; i < g.Rows; i++)
    {
    //cell 0 is first cell of the grid
    j = g.Rows[i].Cells[0].Text;

    }
    Originally posted by summiyashaheen
    how can i read the values of one column of datagrid in vb.net desktop application?

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      This applies to the object "DataGridView"( windows) and also I believe to "GridView"( web) but not for "DataGrid".
      Originally posted by mohitkatariya
      Let g is GridView
      int32 j;
      for (Int32 i = 0; i < g.Rows; i++)
      {
      //cell 0 is first cell of the grid
      j = g.Rows[i].Cells[0].Text;

      }
      If you are running .net2.0 or later, switch to DataGridView and you will be much happier.

      Comment

      Working...