Kendo or jQuery UI

Posted by Community Admin on 04-Aug-2018 19:17

Kendo or jQuery UI

All Replies

Posted by Community Admin on 26-May-2012 00:00

I have been working with Sitefinity for only a short while, and I am trying to get either jQueryUI or KendoUI to work in my user controls. What I have researched doesn't seem to be working. I was hoping someone could steer me in the right direction.

Here is what I have:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ContactForm.ascx.cs" Inherits="UserControls_ContactForm" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls"
    Assembly="Telerik.Sitefinity, Version=5.0.2860.0, Culture=neutral, PublicKeyToken=b28c218413bdf563" %>
     
<sf:JavaScriptEmbedControl ID="script2" runat="server" ScriptEmbedPosition="BeforeBodyEndTag"
    Url="~/App_Data/Sitefinity/WebsiteTemplates/snbTemplate/JS/jQueryUI/js/jquery-ui-1.8.20.custom.min.js" />
<sf:JavaScriptEmbedControl ID="script3" runat="server" ScriptEmbedPosition="BeforeBodyEndTag"
    Url="~/App_Data/Sitefinity/WebsiteTemplates/snbTemplate/JS/Kendo%20UI/js/kendo.all.min.js" />
    <script>
        $(document).ready(function()
            $("#txtDate1").datepicker();
            $("#txtDate2").kendoDatePicker();
        );
    </script>
jQueryUI:
<asp:TextBox ID="txtDate1" runat="server"></asp:TextBox>
<br />
kendo UI: <asp:TextBox ID="txtDate2"
    runat="server"></asp:TextBox>

Am I incorrectly trying to load these js files?

Posted by Community Admin on 27-May-2012 00:00

I guess the most glaring discrepancy is the jQuery reference to the ID of an asp:textbox

For the jQuery reference to be valid, you either need to use ClientIdMode="static" or a standard <input type="text".

Re: Loading js library files in a user control - See this instructive blog.
http://blog.falafel.com/Blogs/george-saadeh/2012/05/09/using-jquery-and-other-javascript-libraries-in-sitefinity

Posted by Community Admin on 27-May-2012 00:00

Sorry I should have noted after I posted, I changed the ClientIDMode to Static. That still didn't help the issue. I will look into the rest. Thank you.

Posted by Community Admin on 27-May-2012 00:00

The link you provided was the answer I was looking for. Thank you for the help!

This thread is closed