GridView

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Morning people, I need to access to all of the rows and cols of a gridview
and get the value of everyone, how can i do this?

Thank you.
 
Morning people, I need to access to all of the rows and cols of a gridview
and get the value of everyone, how can i do this?

for(int x = 0 ; x < gridView1.Columns.Count ; x++ )
for(int y = 0 ; y < gridView1.Rows.Count ; y++ )
object value = gridView1[x,y];
 
I try it and the gridview.columns.count is always zero, and the gridview is
full of data

Patrick Steele said:
Morning people, I need to access to all of the rows and cols of a gridview
and get the value of everyone, how can i do this?

for(int x = 0 ; x < gridView1.Columns.Count ; x++ )
for(int y = 0 ; y < gridView1.Rows.Count ; y++ )
object value = gridView1[x,y];
 
How are you filling the DataGridView? With a datasource? Manually?

I try it and the gridview.columns.count is always zero, and the gridview is
full of data

Patrick Steele said:
Morning people, I need to access to all of the rows and cols of a gridview
and get the value of everyone, how can i do this?

for(int x = 0 ; x < gridView1.Columns.Count ; x++ )
for(int y = 0 ; y < gridView1.Rows.Count ; y++ )
object value = gridView1[x,y];
 
Back
Top