Results 1 to 2 of 2

Thread: Change grid view selected row on edit

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    Ottawa
    Posts
    38

    Change grid view selected row on edit

    On my web page, I have a grid view control that displays data to the users and gives them the ability to either select a row (more information is displayed elsewhere on the page) or click edit, to edit the details of a row. What I am having trouble figuring out is how to change the selected row when the user clicks edit. As an example, the user clicks select on row 3 and the sub-data for row 3 is displayed. Next the user clicks 'Edit' on row 5 which lets him edit line 5 properly, but in the sub-data still just displays row 3 data and is still the selected row. Any ideas would be appreciated.

    Chris

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Change grid view selected row on edit

    GridViews can be sticky to play with... I ended up rewriting all of the default functionality to better handle it. I think the RowEditIndex is the property you're after. If no row is in Edit mode, it returns -1. Otherwise, it returns the index of the row being edited, 0 being the first data row.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width