passing a gridview selected value

J

jonefer

I'd like to use the selected value from particular column of a gridview to
determine a 'parameter' for another gridview control's dataset.

Setting the dataset, is not the problem.
getting the descrete value is...

I thought it would be as simple as this (below)- just as to confirm the
value is being passed.
But my test label doesn't show a value.

Protected Sub GridView3_SelectedIndexChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
Dim strMeasureTitle As String
strMeasureTitle = Me.GridView3.SelectedRow.Cells(0).Text
Me.lblQualConfirm.Text = strMeasureTitle
End Sub

How can I make this work...?

Also, I've named the CommandName for each column so that I can refer to
whichever column returns the strMeasure's value so I can further isolate a
particular dataset to the 2nd grid.

Is this the approach for distinguishing which column sends a particular value?
 
J

Jacques MUREKEZI

Jonefer,

I guess the right format would be:
strmeasuretitle= gridview3.selectedrow.cells[1].text

strMeasureTitle = Me.GridView3.SelectedRow.Cells[1].Text to return what is
in the first row if you used the select field then it is going to be
strMeasureTitle = Me.GridView3.SelectedRow.Cells[2].Text

I hope it will work for you
PS: I don't use me and should work otherwise remove it.

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top