Selecting a row in a gridview

Discussion in 'ASP .Net' started by katmagic, Feb 25, 2008.

  1. katmagic

    katmagic Guest

    I have the SelectedValue of a gridview, how do I select the row based on
    that information?
    katmagic, Feb 25, 2008
    #1
    1. Advertising

  2. "katmagic" <> wrote in message
    news:...

    >I have the SelectedValue of a gridview, how do I select the row based on
    >that information?


    Please clarify a bit more by what you mean by 'select'...

    Do you mean you just want to display the row differently, maybe with a
    different background colour?

    Or do you want to edit the row?

    Or do you want to do something else based on the values of one or more of
    the row's cells...?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Feb 25, 2008
    #2
    1. Advertising

  3. katmagic

    katmagic Guest

    Sorry not very clear. I have some controls that are populated based on the
    value of the selected row of a gridview. When the user modifies those
    controls it causes a postback so I lose the originally selected row of the
    gridview. I want to be able to return the user to the row they had
    selected, so before the postback occurs, I grab the value of the currently
    selected row. Now I want to return the user to that row, how do I do that?
    I hope that makes better sense, thank you so much for your help. Something
    like gv.SelectedIndex = ???

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "katmagic" <> wrote in message
    > news:...
    >
    >>I have the SelectedValue of a gridview, how do I select the row based on
    >>that information?

    >
    > Please clarify a bit more by what you mean by 'select'...
    >
    > Do you mean you just want to display the row differently, maybe with a
    > different background colour?
    >
    > Or do you want to edit the row?
    >
    > Or do you want to do something else based on the values of one or more of
    > the row's cells...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    katmagic, Feb 25, 2008
    #3
    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. Chip

    Selecting a row within a row

    Chip, Feb 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    354
  2. misiek
    Replies:
    0
    Views:
    2,265
    misiek
    Feb 20, 2006
  3. H5N1
    Replies:
    0
    Views:
    2,699
  4. Replies:
    5
    Views:
    648
  5. Not Me
    Replies:
    0
    Views:
    343
    Not Me
    Jan 26, 2007
Loading...

Share This Page