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

Name Space Conflict with the MVC Extensions

7 Answers 202 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hn
Top achievements
Rank 1
hn asked on 12 Jul 2012, 09:00 AM
We have just downloaded the latest July release of Kndo wrappers for MVC . We are trying to test them side by side with the MVC extensions however we get the following error when building the project after adding reference to the Kendo dll

'SliderTickPlacement' is an ambiguous reference between 'Telerik.Web.Mvc.UI.SliderTickPlacement' and 'Kendo.Mvc.UI.SliderTickPlacement'

You do say that it is possible to use  Kendo  within the same project. Would appreciate clarification.
Many thanks

7 Answers, 1 is accepted

Sort by
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 12 Jul 2012, 02:00 PM
We have had similar issues trying to use Kendo for ASP.NET MVC and Telerik MVC extensions together. There's a few namespace conflicts so you either need to namespace all enumerations and other things that are conflicting or just migrate to Kendo. Most helpers are almost direct replacement for the Telerik Extensions, most grids need minimal changes other than DataBinding() <=> DataSource() and ClientEvents <=> Events for the most part. It took us less than 2 weeks to migrate our whole dashboard from Telerik MVC to Kendo and we use quite a few widgets from Grids to Splitters.

What they mean by using Kendo with the Telerik Extensions is using the traditional JavaScript approach with using Kendo UI. Kendo for ASP.NET MVC doesn't work well with the Telerik Extensions.
0
Atanas Korchev
Telerik team
answered on 12 Jul 2012, 03:08 PM
Hello,

 All you need to do is just fully qualify the enum name:

TickPlacement(Kendo.Mvc.UI.SliderTickPlacement.Both)

 
Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
hn
Top achievements
Rank 1
answered on 12 Jul 2012, 04:28 PM
Thanks for your reply.
Does this mean we have to fully qualify all code for both Kendo AND the extensionS ?
0
Atanas Korchev
Telerik team
answered on 13 Jul 2012, 06:42 AM
Hi,

 Of course not. You only need to fully qualify the enums.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
hn
Top achievements
Rank 1
answered on 16 Jul 2012, 11:28 PM
So you mean - Of course yes. That is exactly what I meant. i.e we have to hunt around in our exisitng project and change all enums to be fully qualified while also fully qualifying the Kendo code. right?
0
Bill
Top achievements
Rank 1
answered on 24 Oct 2012, 07:12 PM
SOLUTION - For those of us with large apps to convert from Telerik to KendoUI, you can avoid fully qualifying all of your enums by placing a webconfig directly in each view folder as you migrate that folder. Below is the complete webconfig I have in one of my View folders.  All it does is clear out the namespaces, i.e. the Telerik.Web.MVC.UI sitting in at the root of "Views", and add the ones I want back.  When you've finished migrating, you can remove all of these webconfigs and alter the webconfig at the root of Views or your app, depending on whether you're razor or webforms.  This works for MVC3, for MVC4 you should examine your current webconfig.

<?xml version="1.0"?>

<configuration>
  <system.web.webPages.razor>
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
      <namespaces>
        <clear/>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Kendo.Mvc.UI"/>
      </namespaces>
    </pages>
  </system.web.webPages.razor>
</configuration>
0
Ed
Top achievements
Rank 1
answered on 25 Jul 2014, 01:11 PM
Bill,

Thanks for pointing out the use of the individual web.config files in the Views folders. It saved me a ton of work. :-)

--Ed
Tags
General Discussions
Asked by
hn
Top achievements
Rank 1
Answers by
Vesselin Obreshkov
Top achievements
Rank 2
Atanas Korchev
Telerik team
hn
Top achievements
Rank 1
Bill
Top achievements
Rank 1
Ed
Top achievements
Rank 1
Share this question
or