Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 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
38 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
208 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
228 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
71 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
38 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
95 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
105 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
59 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
1 answer
81 views
Hello!

I have the following objects and datastructure that I would like to bind to the TreeView and have displayed. The classes and datastructure is simplified, but I'm sure you'll get the idea.

public class Folder : TreeComponent
{
    public int Id { get; set; }
    public int ParentId { get; set; }
    public string Name { get; set; }
    public List<TreeComponent> Children { get; set; }
}
 
public class File : TreeComponent
{
    public int Id { get; set; }
    public int ParentId { get; set; }
    public string Name { get; set; }
}

Now, I have a generic list of List<TreeComponent> in which I have some "Folders" and some "Files". The "Folders" also contain "Subfolders" and other "Files". Graphically it looks something like this:

-Folder1 (level1)
    - Folder2 (level2
        - File1 (level 3)
    - File2 (level2)
- Folder3 (level1)
...etc.

So with that datastructure I bind to the TreeView:

this.RadTreeViewAreas.DataFieldID = "Id";
this.RadTreeViewAreas.DataFieldParentID = "ParentId";
this.RadTreeViewAreas.DataTextField = "Name";
this.RadTreeViewAreas.DataSource = this.treeComponentList
this.RadTreeViewAreas.DataBind();

...but only "level 1" nodes are displayed. I guess the TreeView does not support lists with childlists. What is the easiest way to display those subfolders and files. It's not an obtion to "flatten" the initial list it has to stay like it is!

Best regards

Claus
Bozhidar
Telerik team
 answered on 17 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?