Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

List only searched record in Datagrid??

Back to Forum: Tech Off
  • User profile image
    venkatzeus

    Hi..

    I have a web application in which i have 5 records in the datagrid. I have a button called Find.  Now the user clicks on the find button. The user searches for a specific record and the record is displayed on the datagrid. Now the user clicks on the pen icon in the grid to edit the specific searched record. After the update, the updated record and the other previous records in the grid are also shown. i want to list only the updated record in the page. How to do it?

  • User profile image
    ScanIAm

    venkatzeus wrote:
    

    Hi..

    I have a web application in which i have 5 records in the datagrid. I have a button called Find.  Now the user clicks on the find button. The user searches for a specific record and the record is displayed on the datagrid. Now the user clicks on the pen icon in the grid to edit the specific searched record. After the update, the updated record and the other previous records in the grid are also shown. i want to list only the updated record in the page. How to do it?



    ASP.NET 2.0:

    You can create 2 different datasources, 1 for the complete list, and one for the single result of the search.  Then, when they click the find button, you set the find criteria, and switch the datagrid's datasource to the one that only display's a single result.

    This means that when they finish 'editing' that result, it will still only display the single result.

    If you then need to go back to displaying all of the result, you switch the datasource again.

    If you wanted to be really crafty, you could write a BusinessObject datasource and simply call the same function with a flag that would only return the records you want.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.