GridView SelectedRow and Paging

K

Keith G

I have an event fired by a GridView ButtonField that extracts data from the
currently selected row with this code:

string quote = GV1.SelectedRow.Cells[1].Text;
string fmat = GV1.SelectedRow.Cells[2].Text;

This works fine until I turn on Paging, after which I get this error:

Object reference not set to an instance of an object

Is there something I need to set within OnPageIndexChanged to reset the
SelectedRow.


Thanks

Keith
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top