GridView control value access..

  • Thread starter Thread starter RGF
  • Start date Start date
R

RGF

Hi,
I have a GridView control which is binded to a dataset object, I am
able to populate the GridView with the expected data, so that is ok.
I enabled the Selection function from the GridView, which works as
expected. So I end up with a table made of 6 rows and 4 columns.

The problem to solve is:
I would like to retrieve the values say from Row 3, Column 1 and
Column 4, and plug the respective value into a text box.

pseudo code example once row 3 is selected:

textbox1.text = GridView(row(3),column(1))

textbox2.text = GridView(row(3),column(4))

The question:
What is the proper VB.net method syntax to extract the values from the
selected row?

I am using VS 2005, ASP.net 2.0, and VB.net

thanks in advanced!
Ralph
 
Use CurrentCell property of to get the current Cell. It will return
you an datagrid cell object which should conatins the cell info (row
number and col number).
You can track the current cell changed event to do so.

I also have a question. Can u tell me how can i put numbering on LEFT
side of datagrid. I want to put the row numbers on very first column
(the Gray column which is non-editable)

can you help me ?
 
Back
Top