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

[Solved] Rebind: Cannot perform this operation when DataSource is not assigned

2 Answers 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 29 Jul 2013, 10:06 PM
Basically I can't refresh my RadGrid. I have filters above the RadGrid that I apply when the user hits the RadGrid's Refresh button. With or without Ajax, whether or not I intercept the ItemCommand event, whenever it finally calls Rebind it fails with this error: Cannot perform this operation when DataSource is not assigned. It is true the DataSource is null before the call. What's interesting is the NeedDataSource event fires off without a hitch, and when the exception gets back to me the DataSource is properly assigned. I haven't messed with ViewState, so I believe that should still be enabled (or rather inherited seems to be the default nowadays). What am I doing wrong?

Let me know if you'd like to see any of my code, but after staring at it for hours I'm convinced that it's something else I don't know.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Jul 2013, 04:03 AM
Hi,

It's hard to identify what is causing this issue,can you please provide your full code,to find out about this issue.

Thanks,
Princy
0
Matthew
Top achievements
Rank 1
answered on 31 Jul 2013, 07:02 PM
Figured out the issue. A RadListView inside the NestedViewTemplate was failing on its NeedDataSource event. That was showing up at the call to my RadGrid's Rebind, thus the confusion. Sorry!
Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Matthew
Top achievements
Rank 1
Share this question
or