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

[Solved] RadGrid datasource set by another radgrid

4 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jedidiah Racine
Top achievements
Rank 1
Jedidiah Racine asked on 08 Sep 2009, 08:17 PM
I have 2 radgrids and would like to expand a detailview row and populate the second grid from the id of the first grid's expanded row.

I have tried using the itemdatabound of the first grid to set the datasource of the second grid,
but the second grid never refreshes, just keeps the same data.

I have also tried calling the ajax methods from javascript, but the same problem exists.

The only way I was able to do it was from a button that was not connected to either grid.

PS I have turned viewstate off on the second grid.

Thanks,
Jed

4 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 08 Sep 2009, 08:51 PM
I think the reason your outside button worked was because of the postback that occurred from pressing the button. Have you tried using the Rebind() command when binding data to the second grid? You could also try to force a postback when you need to update the source of the other RadGrid.
0
Jedidiah Racine
Top achievements
Rank 1
answered on 08 Sep 2009, 09:13 PM
I have tried datasource = nothing, bind and rebind...  no luck

how do I force a postback from inside another grid?

It seems that everything I do in the first grid just won't cause the second one to visibly rebind.

Thanks,
Jed
0
Schlurk
Top achievements
Rank 2
answered on 08 Sep 2009, 09:21 PM
This might not be the most ideal way to do it but if you use an AjaxManager you could have the first RadGrid cause the second RadGrid to do a postback, this could be what you are looking for. I haven't had the time to try to set up a similar scenario locally so I'm just shooting out some ideas for you.
0
Jedidiah Racine
Top achievements
Rank 1
answered on 08 Sep 2009, 09:24 PM
I have overwritten then ajax postback and called it manually from the first grid and then set the datasource and rebound the second one.
This did not work however...  same problem as before, seond grid did not refresh/rebind.

Thanks,
Jed
Tags
Grid
Asked by
Jedidiah Racine
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Jedidiah Racine
Top achievements
Rank 1
Share this question
or