Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
286 views
I'm trying to use a plugin for masked input. The issue I'm facing is: Uncaught ReferenceError: jQuery is not defined
I'm using v. 2013.3.1324

I add the script from a user control that way:

' On control page init                   
 
CoreHelpers.AddControlScript(Parent.Page.ClientScript, "admin/jquery.inputmask.bundle.min.js", String.Format("{0}admin/jquery.inputmask.bundle.min.js?v={1}", LinkHelpers.VLink(LinkType.Script), AppSettings.StaticFilesVersion))
 
' Wich calls this function so not to add duplicate scripts
 
        Public Shared Function AddControlScript(scriptManager As ClientScriptManager, key As String, script As String) As String
            Dim returnScript As String = String.Empty
 
            If Not scriptManager.IsClientScriptIncludeRegistered(key) Then
                scriptManager.RegisterClientScriptInclude(key, script)
            End If
 
            Return returnScript
        End Function

But as soon as the resource is loaded I have the "Uncaught ReferenceError: jQuery is not defined" error in Chrome console.
The script starts with "(function ($) {................"

Any hint?
I had no problem so far in using jQuery in local function or scripting but this plugin is giving issue, maybe because it starts with "(function ($) {" ?

Thanks in advance

Massimiliano
Top achievements
Rank 1
 answered on 17 Feb 2014
1 answer
109 views
I am sometimes getting this error after removing a node from the TreeView using the following code client-side:

parent.get_nodes().remove(node);

I've read in another post they I should call trackChanges() before and commitChanges() after modifying the TreeView to have my changes persisted to the server:
http://www.telerik.com/forums/unable-to-get-value-of-the-property-gethierarchicalindex-object-is-null-or-undefined

but I'm populating my TreeView entirely client-side in javascript (and don't need to have anything persisted to the server). I did try to call those methods as suggested but I still get the error.

Thanks for your help!
Guy
Plamen
Telerik team
 answered on 17 Feb 2014
2 answers
50 views
Hi everyone,

As the title suggest I'm having an issue where I add some php to the editor using the HTML view and as soon as I switch to Design view it comments out the open and close php tags.. Any solution to this?

John
Slav
Telerik team
 answered on 17 Feb 2014
1 answer
243 views
I have the Telerik editor contained in an aspx page .
This aspx page is loaded dynamically into the div another aspx page using ajax call and setting the html in the div.
Due to this the editor control is showing as frozen, ( couldn't edit and no controls in tool panel works).
when I looked at viewSource of the html I can see that telerik scripts are missing.
if I directly query for container aspx page, the telerik editor is enabled and working fine.
any help is appreciated.
thanks.
Marin Bratanov
Telerik team
 answered on 17 Feb 2014
2 answers
269 views

I have the following bit of code that I have taken from Telerik examples... I have a Rad Window with two RadListBoxes. When the user clicks a button the function returnToParent() is called. This should
a) find the RadListBox2 (which it does)
b) find out how many items are in the RadListBox (this fails with the error Object does not support this property or method)
c) if there are no items show error message (yet to check)
d) iterate through each item and create a string containing each item separated with a semicolon and space (yet to check)
e) remove the last semicolon and space (yet to check)
f) close window id string has a value else give error message (yet to check)

This is my code.... why do I get the error Object does not support this property or method​ at line var x = listBox.get_items().get_count();

<script type="text/javascript">
  
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
  
        function returnToParent() {
            //create the argument that will be returned to the parent page
            var oArg = new Object();
  
            //get the ServiceNames name
            var listBox = document.getElementById("RadListBox2");
            listBox = $telerik.toListBox(listBox);
            //error at the next line...
var x = listBox.get_items().get_count(); 
            if (x < 1) {
                alert("The listBox is empty.");
                oArg.Services = "";
            }
            else {
                for (i = 0; i < x; i++) {
                    oArg.Services += listBox.get_items().get_item(i).value() + "; "
                }
                //remove the last semicolon and space
                oArg.Services = oArg.Services.substring(0, oArg.Services.length - 2);
            }         
             
            //get a reference to the current RadWindow
            var oWnd = GetRadWindow();
  
            //Close the RadWindow and send the argument to the parent page
            if (oArg.Service) {
                oWnd.close(oArg);
            }
            else {
                alert("At least one service must be assigned. If Unknown enter TBC.");
            }
        }
  
    </script>

Any help appreciated
Mych
Top achievements
Rank 1
 answered on 17 Feb 2014
2 answers
111 views
Im just using the default imagebuttons, nothing fancy. The images are huuuuge. How to mitigate this?
Pavlina
Telerik team
 answered on 17 Feb 2014
3 answers
72 views
I am having a problem with my radgrid. When I set a column width manually (ItemStyle-Width="300px" HeaderStyle-Width="300px") I don't get the horizontal scrollbar and my grid crushes all the other columns to fit the grid with. When I remove the width on the one column everything works fine and all the columns are the basic 125px width and I have a long horizontal scrollbar.
Pavlina
Telerik team
 answered on 17 Feb 2014
1 answer
115 views
I have a RadScheduler with a DOCK type edit form.  I added a resource combobox that lists all our PO's.  I added a selectedindexchanged to this ddl so I can fill some textboxes based on the selectedValue.  My codebehind fires but I can't seem to reference the textbox fields....like Subject, description etc.

Code Behind example:
Protected Sub ddlPO_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ddlPO.SelectedIndexChanged
'getting the ddlPO value works fine I just don't know the code needed to fill in the current textboxes like subject

' i'll lookup the extra info from another datasource
Dim objDetail As New ItemController
Dim objDetailInfo As AE_Fiber_InventoryDetailsInfo

objDetailInfo = objDetail.GetAE_Fiber_InventoryDetails(ddlPO.SelectedValue())
If Not objDetailInfo Is Nothing Then
'''this is where I want to update my current appointment fields and/or another dropdown
 ''' this needs to happen in Insert/Edit

'''.subject = objDetailInfo.Location

End If

Thanks
Doug



End Sub

Plamen
Telerik team
 answered on 17 Feb 2014
3 answers
123 views
In Combo box options, when I click on empty space on the dropdown items (other than checkbox and label) the item text is showing in the textbox eventhough check box is not selected.
Added image for your reference.
And I tried to find the length of the checked items while drop down closed and if its 0 then am manually clearing out the textbox control.
Saying that, checked item length is always returns 0.
Code for your reference.

function OnClientDropDownClosing(sender, eventArgs) {
            var combo = $find("<%= rcbPatientType.ClientID %>");
                if (combo.get_checkedItems().length < 1) {
                    combo.set_text("");
                            }
                }
In the image you can see the spot I have marked where I click, at that time 'All ' checkbox is not checked but its shown in textbox
Now what I want is, either click on empty space should not work otherwise the item checkbox should be checked on clicking the equivalent empty space
Plamen
Telerik team
 answered on 17 Feb 2014
1 answer
80 views
   <Columns>
                    <telerik:GridHyperLinkColumn Text="Edit" AllowFiltering="false" DataNavigateUrlFields="ReservationId"
                        DataNavigateUrlFormatString="/admin/order/details?id={0}&action=edit" />
                    <telerik:GridHyperLinkColumn Text="View" AllowFiltering="false" DataNavigateUrlFields="ReservationId"
                        DataNavigateUrlFormatString="/admin/OrderPreview.ashx?id={0}" Target="_blank" />
                    <telerik:GridBoundColumn UniqueName="ReservationId" HeaderText="Reservation Id" DataField="ReservationId"
                        Exportable="True" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" AutoPostBackOnFilter="True"
                        FilterControlWidth="100%" Display="True" Visible="True">
                    </telerik:GridBoundColumn>
</Columns>

RadGrid2.MasterTableView.Columns[0].Visible = false;
RadGrid2.MasterTableView.Columns[1].Visible = false;

RadGrid2.MasterTableView.Columns[0].Display = false;
RadGrid2.MasterTableView.Columns[1].Display = false;

Column 3 still cannot display when exported to Excel File because they have the same DataField.
Any idears? Thank you so much!

Princy
Top achievements
Rank 2
 answered on 17 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?