This is a migrated thread and some comments may be shown as answers.

RadGrid loses DataSource on postback

3 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 03 Dec 2008, 01:43 PM
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?

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 05 Dec 2008, 10:31 AM
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.
0
Roy
Top achievements
Rank 1
answered on 10 Dec 2008, 01:36 PM
Unfortunatly, the operation i wan't to perform is server side and not client side. The previous examples are strictly client side.
0
Maria Ilieva
Telerik team
answered on 16 Dec 2008, 01:01 PM
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.
Tags
Grid
Asked by
Roy
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Roy
Top achievements
Rank 1
Share this question
or