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 usingbut when it comes to this line it shows an error:
- lblname.text= GridView1.SelectedRow.Cell[2].text
object reference not set to an instance of an object


Gajendra JangidRank #157 · 14.9K reputationPosted Jun 6, 2019, 8:08 PM EDT
Ronika JencyRank #770 · 3K reputationPosted Jun 7, 2019, 12:35 AM EDT
Ronika JencyRank #770 · 3K reputationPosted Jun 7, 2019, 1:40 AM EDT
Rupesh KahaneRank #136 · 16.4K reputationPosted Jun 7, 2019, 1:53 AM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Jun 6, 2019, 8:18 PM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Jun 7, 2019, 1:29 AM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Jun 7, 2019, 2:09 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 23, 2019, 7:54 PM EST