RadGrid loses DataSource on postback

4 posts, 0 answers
  1. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 03 Dec 2008 Link to this post

    Hello,

    I'm using RadGrid to view results from an sql table results function.
    In order to do so i'm using the NeedDataSource event, where I call the Linq method mapping the function,
    and setting the resulting into the datasource property.

    A few more background notes which might be helpful:

    The form itself is a search form:
    First block of data is a few search options and a button. The button fires the Rebind method of the RadGrid (Located in the second data block).
    In the NeedDataSource i collect all the relevent parameters, execute the linq method and set the data source.
    From the search results displayed in the second block, the user is required to select 1. after he selects, the page should display
    another ResultSet (a different linq method mapped to an sql table function) in a third block.
    But, when i try to get the item the user selected, i can't access it's data-item.
    That's the point that i can't get past...

    Another foot-note:
    If first search returns only one result, i immediatly select it and display the second ResultSet in the third block. in this simple case it works easily, probebly because the page hasn't been sent to the client-side yet, and everything happens in the server-side at the same postback...

    What can I do to fix this problem?
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Dec 2008 Link to this post

    Hello Roy,

    I have already answered to your support ticket. Please review the provided suggestions:

    " Please refer to the following hep topics which elaborate on this matter. Review the provided approach and verify what the difference in your case is.

    Getting cell values for selected rows client side
    Extracting key values client-side
    "



    Sincerely yours,
    Maria Ilieva
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 10 Dec 2008 Link to this post

    Unfortunatly, the operation i wan't to perform is server side and not client side. The previous examples are strictly client side.
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 16 Dec 2008 Link to this post

    Hello Roy,

    Will it be convenient for you to open a regular support ticket and send us sample runnable project which replicates the described issue. We will test the project locally and do our best to provide accurate solution for your scenario.

    Thank you for the cooperation.

    Kind regards,
    Maria Ilieva
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top