locked
Gridview row editing is not selecting the particular row for update when using searching. RRS feed

  • Question

  • User-1024101449 posted

    Hi,

    When editing particular row in gridview based on my filter from searching fropdown,

    gridview will not highlight the selected row to update. instead it will move the very first row by defualt to edit.

    what is the problem..

    Thursday, July 12, 2018 1:54 PM

Answers

  • User-1034726716 posted

    GridView won't automatically highlight the selected rows. You need to do a bit of work to highlight the updated row. If your issue is about the focus of the edit row, then you have to post some codes here for us to check.

    Just a quick tip when editing rows in GridView without using DataSource controls:

    • Make sure that you are binding your GridView within Not IsPostback block in page load event
    • Make sure that you set the datasource for your GridView before you do a databind at RowEditing event.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 16, 2018 5:45 AM

All replies

  • User632428103 posted

    Hello,

    copy paste little code here thanks

    Thursday, July 12, 2018 2:36 PM
  • User-330142929 posted

    Hi Gani7787,

    According to your description, I think we could use GridView control EditedRowStyle and SelectedRowStyle to realize the purpose of highlight the selected row.

    If you are using a custom CSS to achieve the effect you want before. You could post more details about your codes.

    Look forward to your reply.

    Best Regards

    Abraham

    Friday, July 13, 2018 9:58 AM
  • User-1171043462 posted

    Share your code

    Friday, July 13, 2018 7:42 PM
  • User-1034726716 posted

    GridView won't automatically highlight the selected rows. You need to do a bit of work to highlight the updated row. If your issue is about the focus of the edit row, then you have to post some codes here for us to check.

    Just a quick tip when editing rows in GridView without using DataSource controls:

    • Make sure that you are binding your GridView within Not IsPostback block in page load event
    • Make sure that you set the datasource for your GridView before you do a databind at RowEditing event.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 16, 2018 5:45 AM