Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
275 views
I'm working with the RadTreeView, and the RadTreeView is being loaded from a folder structure on an FTP Server;

My question is how best can I change the order programmatically with C# - move a node value from last item to the seventh item;

The code snippet below displays how the RadTreeView is being loaded with C#, and I am able locate the node value - which needs to be moved in the RadTreeView hiarchy;

Thanks in advance for any insight;  Best regards - Rob  
private void BindTreeToDirectory(string virtualPath, RadTreeNode parentNode)
   {    
       string physicalPath = Server.MapPath(virtualPath);
       string[] directories = Directory.GetDirectories(physicalPath);
       foreach (string directory in directories)
       {
           RadTreeNode node = new RadTreeNode(Path.GetFileName(directory));
           node.Value = virtualPath + "/" + Path.GetFileName(directory);
           node.ImageUrl = "~/TreeView/Img/Vista/folder.png";
           node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
           //if (node.Value == "/Customers/Maines Paper & Foodservice/Side Letters")
           if (node.Value == "/Customers/Maines Paper & Foodservice/Maintenance Provider AIM")
           {
               //var index = parentNode.
               //     directories[8];
               //var index = directories[7];
           }
           else
           {
               parentNode.Nodes.Add(node);
           }
           //RadTreeNode nodeSideLetters = new RadTreeNode("/Customers/Maines Paper & Foodservice/Side Letters");
           //parentNode.Nodes.Add(nodeSideLetters);
                         
       }
Plamen
Telerik team
 answered on 24 Oct 2011
1 answer
146 views
Dear Support

I have an Radwindow as an popup on one of the aspx page. When the user scroll down the page the popup should also stuck to the bottom of the screen and the user can scroll down the page.
While scrolling down the popup should be in front and user will scroll the page up & down. and pop-up will remain on the bottom of the screen

Please find the attached screen shot. If I am able to understand issue.
Marin Bratanov
Telerik team
 answered on 24 Oct 2011
10 answers
585 views
My grid displays fine with all the valid data but once I click on one of the columns to sort, it crashes with the following call stack
I have double checked SortExpression and DataField and they are same (pl. see below).  I do have bunch of nulls for data, but it seems to handle them in displaying. Any help would be greatly appreciated. Thanks

[IndexOutOfRangeException: Cannot find column FILE_NAME.]
   System.Data.DataTable.ParseSortString(String sortString) +4826462
   System.Data.DataView.CheckSort(String sort) +32
   System.Data.DataView.set_Sort(String value) +128
   Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +4873
   Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +41
   Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +171
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +356
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +713
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +28
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +368
   Telerik.Web.UI.GridSortCommandEventArgs.ExecuteCommand(Object source) +326
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +61
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


My aspx portion is here
<telerik:RadGrid ID="ExcelGrid"  AutoGenerateColumns="false" EnableViewState="true"
                Skin="Office2007"
             AllowSorting="True"
               AllowMultiRowSelection="false" runat="server" GridLines="None"
               OnItemDataBound="ExcelGrid_ItemDataBound"
               onneeddatasource="ExcelGrid_NeedDataSource">
             <MasterTableView Width="100%" BorderWidth="0" TableLayout="Auto" DataKeyNames="FILE_NAME">
             
                 <RowIndicatorColumn>
                     <HeaderStyle Width="20px" />
                 </RowIndicatorColumn>
                 <ExpandCollapseColumn>
                     <HeaderStyle Width="20px" />
                 </ExpandCollapseColumn>
                 <Columns>
                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Row#">
                    <ItemStyle HorizontalAlign="left"/>
                   <ItemTemplate>
                    <asp:Label ID="numberLabel" runat="server"/>
                   </ItemTemplate>    
                   </telerik:GridTemplateColumn>             
                     <telerik:GridTemplateColumn DataField="FILE_NAME" HeaderText="File Name"
                         SortExpression="FILE_NAME" UniqueName="FILE_NAME">
                         <ItemStyle HorizontalAlign="left" Width="35" />
                         <ItemTemplate>                            
                             <a href='download.aspx?docID=<%# DataBinder.Eval(Container.DataItem, "FILE_NAME").ToString() %>'>
                             <%# DataBinder.Eval(Container.DataItem, "FILE_NAME").ToString()%></a>
                         </ItemTemplate>
                     </telerik:GridTemplateColumn>
                     <telerik:GridBoundColumn DataField="Agreemt_Date" HeaderText="Agreement Date" DataFormatString="{0:dd/MM/yyyy}"
                         SortExpression="Agreemt_Date" UniqueName="Agreemt_Date">
                         <ItemStyle HorizontalAlign="left" Width="25" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Orig_Agmt_Type" HeaderText="Original Agreement Type"
                         SortExpression="Orig_Agmt_Type" UniqueName="Orig_Agmt_Type">
                         <ItemStyle HorizontalAlign="left" Width="35" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Mod_Agreemt_Type" HeaderText="Model Agreement Type"
                         SortExpression="Mod_Agreemt_Type" UniqueName="Mod_Agreemt_Type">
                         <ItemStyle HorizontalAlign="left" Width="35" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Parties" HeaderText="Parties"
                         SortExpression="Parties" UniqueName="Parties">
                         <ItemStyle HorizontalAlign="left" Width="50" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Basin" HeaderText="Basin"
                         SortExpression="Basin" UniqueName="Basin">
                         <ItemStyle HorizontalAlign="left" Width="30" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Municipality" HeaderText="Municipality"
                         SortExpression="Municipality" UniqueName="Municipality">
                         <ItemStyle HorizontalAlign="left" Width="75" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Sewershed_Area" HeaderText="Sewershed / Area"
                         SortExpression="Sewershed_Area" UniqueName="Sewershed_Area">
                         <ItemStyle HorizontalAlign="left" Width="30" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Source" HeaderText="Source"
                         SortExpression="Source" UniqueName="Source">
                         <ItemStyle HorizontalAlign="left" Width="122" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Status" HeaderText="Status"
                         SortExpression="Status" UniqueName="Status">
                         <ItemStyle HorizontalAlign="left" Width="30" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Notes" HeaderText="Notes"
                         SortExpression="Notes" UniqueName="Notes">
                         <ItemStyle HorizontalAlign="left" Width="50" />
                     </telerik:GridBoundColumn>
                 </Columns>             
             </MasterTableView>
             <ClientSettings>
                 <Scrolling AllowScroll="True" UseStaticHeaders="True" />
             </ClientSettings>               
            </telerik:RadGrid>

Mira
Telerik team
 answered on 24 Oct 2011
2 answers
76 views

I have a radgrid with two group-by-expressions defined, and aggregate sums defined on the bound columns.  I want to hide the outer GridGroupFooterItem.  My problem is similar to the one described in this other forum post.
http://www.telerik.com/community/forums/aspnet-ajax/grid/groupfooter-on-subgroup-only.aspx

I have a runtime reference to the GridGroupFooterItem in my ItemDataBound event handler.  And I also know, from GroupIndex, whether a footer is the inner or outer one.

My problem is that I have not found a way to hide the GridGroupFooterItem, as was suggested by the response to that original post.

Can anyone assist?

Mark
Top achievements
Rank 1
 answered on 24 Oct 2011
2 answers
103 views
Hi Guys,

I need help in saving a state of a control..
I want to put a button "SAVE" when you click on that, the current state of the controls like Radgrid data, Rad filter values, Rad treeview nodes should be saved in a file format. And when you Open that file  the page should be loaded and User can  work on the page as usual..IS this possible in TELERIK..??

THANKS IN ADVANCE
KIRAN 
Iana Tsolova
Telerik team
 answered on 24 Oct 2011
1 answer
119 views
is there any method for acces to local folders/files with this control or other?
Dobromir
Telerik team
 answered on 24 Oct 2011
1 answer
102 views
Hi I am working on a project which has a user control containing a Telerik Tree View on a page, with an information panel on the main page. The user can traverse the tree in the usercontrol which contains folders and items, and if they click an item it loads the information for that item into the main page.

This is handled by using delegates in the user control, and subscribing to that bubbled event in the master page.

I have wrapped this up with a RadAjaxManager, and I want the information panel to have a LoadingPanel displayed over it ONLY when an item is selected, but not a folder. In the user control we do not raise the event if the item is a folder.

I haven't had any luck with this.

I have created a project which displays this behaviour. You can see that when the folders are clicked they also display the loading panel over the main panel, which is what I want to prevent. This is because in production environment, clicking a folder expands the folder but does not reload the main information, but having the loading panel put over it gives the user the impression that it is reloaded.

Can you please help me get this working?

My project contains two files, Default.aspx and FolderView.ascx

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="testlab" TagName="treeview" Src="~/FolderView.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
 
    <telerik:RadScriptManager id="RadScriptManager1" runat="server" />
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pnlTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="pnl1" LoadingPanelID="LoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Windows7" />
 
    <div>
    <table>
        <tr>
        <td valign="top">
            <asp:Panel ID="pnlTreeView1" runat="server">
                <testlab:treeview runat="server" id="treeview1" OnItemSelected="treeview1_ItemSelected">
                </testlab:treeview>
            </asp:Panel>
        </td>
        <td valign="top">
            <asp:Panel ID="pnl1" runat="server" Width="450" Height="450">
                Select a node.<br />
                <asp:Label ID="lbl1" runat="server" />
            </asp:Panel>
        </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>

Default.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
    protected void treeview1_ItemSelected(object sender, LAB_FolderView.ItemSelectedEventArgs e)
    {
        lbl1.Text += e.SeletedItemText + " clicked, category = " + e.StorageItemType + "<br/>";
    }
}

FolderView.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FolderView.ascx.cs" Inherits="LAB_FolderView" %>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" />
<div style="border:solid 1px black;">
<telerik:RadTreeView
    ID="RadTreeView1"
    runat="server"
    OnNodeExpand="RadTreeView1_NodeExpand"                     
    OnNodeClick="RadTreeView1_NodeClick"
    Width="300" Height="300"
>
    <Nodes>
        <telerik:RadTreeNode Value="FRUIT" Text="Fruit" Expanded="false" Category="FOLDER" ImageUrl="folder.gif" ExpandedImageUrl="FolderOpen.gif">
            <Nodes>
                <telerik:RadTreeNode Value="ORANGE" Text="Orange" Category="ITEM"/>
                <telerik:RadTreeNode Value="BANANA" Text="Banana" Category="ITEM"/>
                <telerik:RadTreeNode Value="APPLE" Text="Apple" Category="ITEM"/>
                <telerik:RadTreeNode Value="TAMARILLO" Text="Tamarillo" Category="ITEM"/>
            </Nodes>
        </telerik:RadTreeNode>
        <telerik:RadTreeNode Value="VEGETABLE" Text="Vegetable" Expanded="false" Category="FOLDER" ImageUrl="folder.gif" ExpandedImageUrl="FolderOpen.gif">
            <Nodes>
                <telerik:RadTreeNode Value="LETTUCE" Text="Lettuce" Category="ITEM"/>
                <telerik:RadTreeNode Value="POTATO" Text="Potato" Category="ITEM"/>
                <telerik:RadTreeNode Value="BROCCOLI" Text="Brocolli" Category="ITEM"/>
                <telerik:RadTreeNode Value="ONION" Text="Onion" Category="ITEM"/>
            </Nodes>
        </telerik:RadTreeNode>
    </Nodes>
</telerik:RadTreeView>
<div id="divDebug" runat="server" />
</div>

FolderView.ascx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik;
using Telerik.Web.UI;
 
public partial class LAB_FolderView : System.Web.UI.UserControl
{
 
    #region Event Bubbling
 
    public enum StorageFolderItemType
    {
        FOLDER,
        ITEM
    }
 
    public class ItemSelectedEventArgs : EventArgs
    {
        public string SelectedItemsValue { get; set; }
        public string SeletedItemText { get; set; }
        public StorageFolderItemType StorageItemType { get; set; }
    }
    public class ItemDeletedEventArgs : EventArgs
    {
        public string SelectedItemsValue { get; set; }
        public string SeletedItemText { get; set; }
        public StorageFolderItemType StorageItemType { get; set; }
    }
     
//  Item Selected
    public delegate void ItemSelectedEventHandler(object sender, ItemSelectedEventArgs e);
    public event ItemSelectedEventHandler ItemSelected;
    protected virtual void OnItemSelected(RadTreeNodeEventArgs e)
    {
         
        ItemSelectedEventArgs args = new ItemSelectedEventArgs();
        args.SelectedItemsValue = e.Node.Value;
        args.SeletedItemText = e.Node.Text;
        args.StorageItemType = e.Node.Category == "FOLDER" ? StorageFolderItemType.FOLDER : StorageFolderItemType.ITEM;
        ItemSelected(this, args);
    }
 
    #endregion
 
 
 
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        Debug(e.Node.Text + " clicked, category = " + e.Node.Category);
        if (e.Node.Category == "ITEM")
        {  
        //  LoadIDPDevelopmentNeedItem(Int32.Parse(e.Node.Value.TrimStart("I".ToCharArray())), VIEW_MODE.VIEW);
            OnItemSelected(e);
        }
    }
    protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
        Debug("NodeExpand called on " + e.Node.ID);
    }
 
    protected void Debug(object o)
    {
        divDebug.InnerHtml += o.ToString() + "<br/>";
    }
 
}

 

Iana Tsolova
Telerik team
 answered on 24 Oct 2011
1 answer
94 views
On Clicking 'F11' page moves up and does not readjust to complete page height.
This problem comes when we update to latest version of telerik Q2.

Please suggest to remove this issues..


Dobromir
Telerik team
 answered on 24 Oct 2011
3 answers
174 views
Greetings,

I studied this :

http://www.telerik.com/support/kb/aspnet-ajax/grid/using-radwindow-for-editing-inserting-radgrid-records.aspx

This is working perfectly but i need to send the row ID to a radwindow not to edit data but to display informations from another table using this ID.

Thanks in advance for your help

Adigard
Top achievements
Rank 1
 answered on 24 Oct 2011
0 answers
53 views
Hello,
 
       (I have AjaxPanel placed inside ContentPlaceHolder under some page which includes AjaxLoadingPanel  targetting by AjaxPanel.
 I placed many control inside AjaxPanel during postback event AjaxLoadingPanel will be loaded).


       Now I have two ContentPlaceHolder under Master-Page. One ContentPlaceHolder as Menu with MenuItem say delete, Add, Save  and another ContentPlaceHolder will hold all the controls associated with some page with whom this Masterpage is referenced.
     Whenever I click menu-Item say delete button, under respective page which is active and with whom this Masterpage  is associated should show AjaxLoadingPanel.

  Briefly: I have to fire AjaxLoadingPanel under some page, using control placed under MasterPage whenever I required.

(We are evaluating asp.net ajax)
Please help me on this Regards,
Gautham

     

 




gautham
Top achievements
Rank 1
 asked on 24 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?