How do I get the value from a particular cell in the gridview?
-
Hi! I am using vb.net. In this scenario I would like to fetch the price value and display it in the label. Here is my gridview:
thanks in advance. Much appreciated.
-
Hi! I am using vb.net. In this scenario I would like to fetch the price value and display it in the label. Here is my gridview:
thanks in advance. Much appreciated.
You will need to use the OnItemDataBound property event. I used a Datagrid, Not sure about gridview. When you set OnItemDataBound="Somename" In your code-behind you should code this:
Protected Sub Somename(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Dim VariableA As Integer/Double e.Items.Cells(3[in this case]).Text = VariableA
Then do whatever you want with the variable really.. that's it :)