Subin Thomas

Subin Thomas

  • NA
  • 4.9k
  • 126k

how to access gridview column values into another function ?

Jun 6 2019 11:57 PM
i have a gridview named GridView1 which has 6 columns 1st and 6th is a buttonfield.
on a button submit click i binded gridview1 now i have another function for which i need Gridview1 column data. 
 
i tried using
  1. lblname.text= GridView1.SelectedRow.Cell[2].text  
but when it comes to this line it shows an error:
object reference not set to an instance of an object 

Answers (8)