GridView SelectedRow and Paging

Discussion in 'ASP .Net Web Controls' started by Keith G, Oct 16, 2006.

  1. Keith G

    Keith G Guest

    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
    Keith G, Oct 16, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mosscliffe

    GridView.SelectedRow - need Help Please

    mosscliffe, May 25, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    5,686
    =?Utf-8?B?RGF2aWQgSmVzc2Vl?=
    May 25, 2006
  2. HaVoK

    GridView selectedrow values

    HaVoK, Oct 17, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    850
    Mark Rae
    Oct 17, 2006
  3. =?Utf-8?B?QmFkaXM=?=

    GridView SelectedRow

    =?Utf-8?B?QmFkaXM=?=, Dec 5, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    3,872
    Phil H
    Dec 7, 2006
  4. =?Utf-8?B?QmFkaXM=?=

    Get SelectedRow index

    =?Utf-8?B?QmFkaXM=?=, Dec 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    369
    =?Utf-8?B?QmFkaXM=?=
    Dec 7, 2006
  5. Steve B.
    Replies:
    2
    Views:
    428
    Steve B.
    Dec 8, 2006
Loading...

Share This Page