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

does not take '1' arguments

2 Answers 667 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sefer kılıç
Top achievements
Rank 1
sefer kılıç asked on 15 Mar 2010, 12:34 PM
Telerik Dll Version : 2010.1.309
Mvc Version: 2
Visual Studio 2008 sp1
Platform : Windows7

I'm try to change Telerik.Web.Mvc.Examples project TreeView DataBinding page.
I just change page source from Nortwind categories to nortwind Customer than it's start an error like below; 

have any idea ?

Thanks

Compilation Error

Description:An error occurred during the compilation of a resource required to servicethis request. Please review the following specific error details and modify yoursource code appropriately.

Compiler Error Message: CS1593:Delegate'System.Action<Telerik.Web.Mvc.UI.TreeViewItem,Telerik.Web.Mvc.Examples.Models.Customer>'does not take '1' arguments

Source Error:

Line 6:  <%= Html.Telerik().TreeView()Line 7:          .Name("TreeView")Line 8:          .BindTo(Model, mappings2 =>Line 9:          {Line 10:             mappings2.For<Customer>(binding => binding

SourceFile:e:\mvc\Telerik_Extensions_for_ASPNET_MVC_2010_1_309_OpenSource\Examples\Telerik.Web.Mvc.Examples\Views\TreeView\DataBindingToModel.aspxLine:

2 Answers, 1 is accepted

Sort by
0
sefer kılıç
Top achievements
Rank 1
answered on 15 Mar 2010, 01:41 PM
I find problem.

There was a problem names, I wrote Orders as Order.
Rename it to Orders and now working
0
Eve Cunning
Top achievements
Rank 1
answered on 21 Apr 2011, 02:27 PM
To save someone trouble:  this "Delegate 'System.Action<Telerik.Web.Mvc.UI.TreeViewItem,[xxx]>' does not take '1' arguments" error seems to be the one you'll get for basic problems with your treeview's declaration.  

I was also getting this same error, but mine was because of a type mismatch.  I was trying to bind an integer field to item.Value, which is a string.

If neither of our issues above were the problem for you, narrow down your problem by commenting out parts of the treeview declaration until it starts working, and then uncomment sections of it until it breaks again.
Tags
TreeView
Asked by
sefer kılıç
Top achievements
Rank 1
Answers by
sefer kılıç
Top achievements
Rank 1
Eve Cunning
Top achievements
Rank 1
Share this question
or