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

Databinding methods such as Eval() ... etc ... error after postback from combobox in grid.

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 05 Oct 2011, 01:21 PM
I have a hierarchical grid with a nestedview template in one of the child grids. A couple of the grids have a cascading combo, where one combo triggers a postback so that the second combo can be populated with new data. The problem I have is that I'm getting a

"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."


error when the selected item of the first combo is changed.

I've looked around but haven't found the solution yet. I've had this issue before but can't remember how I solved it (or even if I did). I'm wondering in this instance if it's a RadGrid-specific issue. One option will be to handle the postback and repopulation (I'm assuming that it's the combos that are causing the problem) programmatically but I'm not sure how to do that when the combos are in an editform or in a grid contained in a nestedview template.

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Oct 2011, 02:47 PM
Hello,

Please look in this post.

may be :  This error generated because you give SqldataSource in your mark up. like (<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource1")
If yes then plaese remove DataSourceID from there please assign these thing from code behind.

If you still have any issue then please let me know (also provide your code).


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or