Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 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
1 answer
112 views
Hi,

I'm using Telerik controls (version 2013.2.717.40) alongside a jQuery plugin called handsontable within a DNN7 application. My page with the Telerik controls and plugin all work fine in in IE9+, Chrome and Firefox however there's an issue with IE8. In summary, even if I include just a reference to the handsontable javascript files in the head of my page using regular script tags (without actually including any code to render the table) and there's a postback then the page stops responding. I've attached a screenshot of where in the javascript is falling over (please see line highlighted in yellow). It seems to be falling over when it encounters something relating to opacity / filter. I appreciate that this is not entirely a Telerik related issue (as the page works in IE8 if I exclude the plugin - which isn't an option) but I'm wondering whether someone might know what might be causing it.


Thanks
Angel Petrov
Telerik team
 answered on 17 Feb 2014
1 answer
130 views
Hi All ,
            I have a radgrid which have child grid in which I have Footer template when I am exporting it by using "OnExcelMLExportRowCreated"   event I am unable to get  these items from footer template . and also unable  to get  the items of groupFooter template

 <telerik:GridTemplateColumn HeaderText="column" UniqueName="column" SortExpression="Subtotal" FooterStyle-HorizontalAlign="Right" FooterAggregateFormatString="{0:0.000}">
                                                                <HeaderStyle Wrap="false" Width="230px" />
                                                                <ItemStyle Wrap="false" HorizontalAlign="Right" />
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="requestTotalLabel" Text='<%#Eval("total") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <table width="100%">
                                                                        <tr>
                                                                            <td style="white-space: nowrap">
                                                                                <asp:Label runat="server" ID="requestTotalLabel" Text="request column:"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
                                                                                    Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
                                                                                </telerik:RadNumericTextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="white-space: nowrap">
                                                                                <asp:Label runat="server" ID="addressLabel" Text="address:"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <telerik:RadNumericTextBox runat="server" ID="addressRadNumericTextBox" ReadOnly="true"
                                                                                    Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
                                                                                </telerik:RadNumericTextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="white-space: nowrap">
                                                                                <asp:Label runat="server" ID="TaxesLabel" Text="Taxes:"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <telerik:RadNumericTextBox runat="server" ID="TaxesRadNumericTextBox" ReadOnly="true"
                                                                                    Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
                                                                                </telerik:RadNumericTextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td colspan="2">
                                                                                <hr />
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="white-space: nowrap">
                                                                                <asp:Label runat="server" ID="requestTotalLabel" Text="request Total:"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
                                                                                    Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="2" CssClass="AlignedRadNumericTextBox">
                                                                                </telerik:RadNumericTextBox>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </FooterTemplate>
                                                            </telerik:GridTemplateColumn>


on code behind I am accessing it as 
 foreach (GridGroupFooterItem item in RadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
            {
                //set the colspan, so that the template cells are aligned with the grid columns
                for (int i = 0; i <= item.Cells.Count - 1; i++)
                {
                    (item.Cells[i] as TableCell).ColumnSpan = 1;
                }
                //color the footer labels based on the group index
                //SetFooterLabelsColor(item);
            }
 foreach (GridGroupFooterItem item in OrderLineItemsRadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
            {
                //set the colspan, so that the template cells are aligned with the grid columns
                for (int i = 0; i <= item.Cells.Count - 1; i++)
                {
                    (item.Cells[i] as TableCell).ColumnSpan = 1;
                }
              
            }



thanks





Angel Petrov
Telerik team
 answered on 17 Feb 2014
1 answer
685 views
Hi,

is there any event that is fired if value of combobox with checkboxes was changed? ( I need it to load items to dependent comboboxes) And I cannot use ItemChecked event, I need event that is fired after user closes dropdown, not event that is fired after each item is checked. TextChanged event is also useless in this situation because it works only if I select 1 item in combobox. SelectIndexChanged also doesn't work for more than one item.

So is there any way how to do that or do I have to use client-side events?

Thanks,
Karel Bem
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2014
1 answer
114 views
How set Regular Expression Validator to a GridHTMLEditorColumn using Sub RadGrid1_ItemCreated?
And tips how i get MaxLength to work in GridHTMLEditorColumn?
Princy
Top achievements
Rank 2
 answered on 17 Feb 2014
1 answer
139 views
Hi
I am using RadWindow which contains RadAsyUpload in asp.net update panel , image control and button when i select image in RadasyUpload image get uploaded and preview is displaying in image control, but problem is that when image uploaded RadWindow get close and to view image i have to open Radwindow again , how could i keep open RadWindow after displaying image and close it when i click on close button
Princy
Top achievements
Rank 2
 answered on 17 Feb 2014
1 answer
227 views
I used image button in TemplateColumn I want to get DataKeyNames(id)  value of row when Image button clicked  to view PDF file that  stored in server and has the same name as id of row in new tab, how can I do this 
Thanks
Princy
Top achievements
Rank 2
 answered on 17 Feb 2014
4 answers
241 views
how can i decrease space between groups of TileList.  i am using rtlistGroupSeparator as describe in telerik documentation custom css. but not working for me. can any one explain it for me... thanks 
Amigo
Top achievements
Rank 1
 answered on 17 Feb 2014
5 answers
135 views

I want to create a 2 pages/windows which:

  • The first page is used to upload a file and when I press next, goes to the second page
  • The second page I can enter some values based on the file uploaded

I'm not sure how I can transition between the 2 pages without closing the first page and reopen the second page. Is there a way to do that?

Thanks,

Shinu
Top achievements
Rank 2
 answered on 17 Feb 2014
1 answer
253 views
If a RadButton is set to true in the code behind as being selected (with no actual click event or click activity) does it always visually manifest as being "selected".  Meaning does it visually toggle back and forth in response to code-behind operations like ".Checked"=true?

Would this be accomplished with the "OnToggleStateChanged"?  Perhaps changing the state manually?

The standard AJAX components I'm working with the Visual Studio don't seem to update themselves in response to code behind and seem to require some JavaScript which I'm trying to avoid.

Thanks in advance for any help...
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?