Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
165 views
How do you enable button back if an IF statement in the code-behind uses Exit Sub method?
I have this JavaScript code which disable the button when the event is triggered and then enable it back when it ends up.

        function RequestStart(sender, args) 
        { 
           args.EventTargetElement.disabled = true; 
        } 
        function ResponseEnd(sender, args) 
        { 
           args.EventTargetElement.disabled = false;  
        } 

Say that i have this code behind:
If Expression Then 
   ' i want to enable the button here 
   Exit Sub 
End If 

Thanks


Wim van der Linden
Top achievements
Rank 1
 answered on 09 Oct 2009
1 answer
98 views

 


Hi,

We've the Telerik's licensed version. In the trial version when we ran with the below code, w egot our buttons neatly displayed with
 our cssclass.

<
asp:Button ID="m_ctlPackageEditButton" runat="server" Text="Edit"

 

 

CssClass ="StandardButton" OnClick="m_ctlPackageEditButton_Click"/>

But now, with licensed version, we've the same code as above, but we're not getting the button's display. Just the text of the button appears and the display(box shape) is not there. Just Edit appears. Pls guide us to what we need to do.

Our customers are not happy with such buttons .

 

Georgi Tunev
Telerik team
 answered on 09 Oct 2009
1 answer
162 views
I build my project with almost RadControls for ASP.NET Ajax tools . I understand ie8 have javascript checking method to take slow appication.You can suggestion me to improve the performance for my website with IE8?
(I try to disable viewstate radcompression, and remove almost exclude javascript file but still slow.)

Demo website (You can try to change left menu to test response time of this page compare with 2 browser IE8,FF etc.)
(FF 5 sec for response time but  IE8 over 15 sec test on my machine)
http://www.itorderonline.com/Default.aspx?pageid=3&CAG_ID=172

Thanks for your help


Veselin Vasilev
Telerik team
 answered on 09 Oct 2009
5 answers
177 views
Hi all,

Is it possible to hide day view or weekly view or monthly view?  I can disable it so it does nothing when a user clicks on it but it would be more elegant if I could just hide any or all of the views.

Specifically for this example I want to hide 'month' view tab from the user.

 Can this be done?

Thanks,
Jeremy
Peter
Top achievements
Rank 1
 answered on 09 Oct 2009
1 answer
149 views
Hello

I have a project built on docks. These docs are in a master page, here yo ucan see the structure:

        <asp:UpdatePanel runat="server" ID="updatePanel"> 
            <ContentTemplate> 
                <cc1:DockLayout ID="dockLayout" runat="server" EnableViewState="false" StoreLayoutInViewState="false"> 
                    <uc1:Header ID="ctrlHeader" runat="server" /> 
                    <uc1:SubHeader ID="SubHeader1" runat="server" /> 
                    <div class="leftpart"> 
                        <div style="margin-top: 5px;"> 
                            <uc1:Menu ID="Menu" runat="server" /> 
                        </div> 
                        <div style="margin-top: 5px;"> 
                         
                            <cc1:DockZone ID="LeftDocZone" runat="server" Orientation="Vertical" Visible="true"> 
                            </cc1:DockZone> 
                        </div> 
                    </div> 
                    <div class="midpart"> 
                        <cc1:DockZone ID="CenterDockZone" runat="server" Orientation="Vertical"> 
                        </cc1:DockZone> 
                    </div> 
                    <div class="rightpart"> 
                        <cc1:DockZone ID="RightDockZone" runat="server" Orientation="Vertical"> 
                        </cc1:DockZone> 
                    </div> 
                </cc1:DockLayout> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
        <div> 
        <uc1:Footer ID="Footer1" runat="server" /> 
        </div> 

As you can see I've split my page up into three columns. And all of my pages are using this theme. I get my page details from sql server than generate them from a BasePage control. Everything is working really great. But I've really got a big problem with paging parameters. I tried telerik's grid component it works fine. But when I try to use SEO Url mode it's not working. I mean when I click the page links the page just loads itself. Than I thought maybe something wrong with this, and I built another page with  .net's ListView and DataPager control. But nothing has changed. I'm curious how this can happen? Here's my URL: Category.aspx?CatID=18&pageNumber=2 and here's my code behind.

    protected void Page_Load(object sender, EventArgs e) 
    { 
        PopulateSearchPanel(); 
    } 
 
    private void PopulateSearchPanel() 
    { 
        int catID = Convert.ToInt32(StringUtil.GetQueryString("CatID")); 
        List<ProductItem> products = ProductFactory.GetCategoryProducts(catID, 1); 
        itemCount = products.Count; 
 
        foreach (ProductItem p in products) 
        { 
            var productItem = new RadPanelItem(); 
            pproductItem.Text = p.ProductName; 
            productItem.NavigateUrl = "#"; 
        } 
 
        ProductsListView.DataSource = products; 
        ProductsListView.DataBind(); 
    } 

Where am I missing? Is that because Dock or what? I really need help with this..
Jim
Top achievements
Rank 1
 answered on 09 Oct 2009
1 answer
145 views
I have a RadUpload control with a ProgressArea, when uploading in IE6 or IE7 the progress area's progress bar works fine however under firefox the progress Area shows and you can see the percentages and the byte/sec values change, however the progress bar does not show....this also happens in google Chrome.  We are using Firefox 3.0.14, the server is running IIS7.  I've used some of the suggestion including using 2009 Q2 build 826 and still no progress bar under Firefox.  I've included the web config.

Thanks

<?

 

xml version="1.0"?>

 

<

 

configuration>

 

<

 

configSections>

 

<

 

sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

 

<

 

section name="WorklistHandler.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

 

<

 

section name="GPI.WorkflowService.Interface.InternalWF.WSComms.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

 

</

 

sectionGroup>

 

<

 

sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />

 

<

 

section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

configSections>

 

<

 

appSettings>

 

<

 

add key="PageSize" value="-1" />

 

<

 

add key="CommSrvClientID" value="2000" />

 

<

 

add key="NoteSensitivity" value="Normal" />

 

<

 

add key="NoteCategory" value="2000" />

 

<

 

add key="NotificationSalesRecipPrefix" value="recip://Sales/" />

 

<

 

add key="NotificationSalesGrp" value="group://Services/Workflow" />

 

<

 

add key="XSLTLocation" value="D:\GPI\MOSS_M2\WorkflowSystem\WorklistHandler\XML\XSLT\" />

 

<

 

add key="DMSSystemID" value="2" />

 

<

 

add key="RiskCalcURL" value="http://dev-tosweb001/RiskCalculator/RiskCalculator.aspx" />

 

<

 

add key="DMSURL" value="ListDocuments.aspx" />

 

<

 

add key="DMSViewerURL" value="BrowserView.aspx?ViewType=D&amp;SystemID=2" />

 

</

 

appSettings>

 

<

 

connectionStrings />

 

<

 

system.web>

 

<!--

 

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

 

 

-->

 

<

 

compilation debug="true">

 

<

 

assemblies>

 

<

 

add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

</

 

assemblies>

 

</

 

compilation>

 

<!--

The <authentication> section enables configuration

of the security authentication mod e used by

ASP.NET to identify an incoming user.

 

 

-->

 

<

 

authentication mode="Windows" />

 

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

 

<customErrors mode="RemoteOnly" defaultRedirect="Error.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

 

 

-->

 

<

 

pages>

 

<

 

controls>

 

<

 

add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>

 

</

 

controls>

 

</

 

pages>

 

<

 

httpRuntime maxRequestLength="50000" executionTimeout="3600" />

 

<

 

httpHandlers>

 

<

 

remove verb="*" path="*.asmx" />

 

<

 

add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />

 

<

 

add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false" />

 

<

 

add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" validate="false" />

 

</

 

httpHandlers>

 

<

 

httpModules>

 

<

 

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />

 

</

 

httpModules>

 

</

 

system.web>

 

<

 

applicationSettings>

 

<

 

WorklistHandler.Properties.Settings>

 

<

 

setting name="WorklistHandler_WorkflowWS_WorkflowService" serializeAs="String">

 

<

 

value>http://localhost/WorkflowProxyService/GPIWorkflow.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_CommWS_CommWS" serializeAs="String">

 

<

 

value>http://localhost/CommWS/CommWS.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_DMSService_DMSService" serializeAs="String">

 

<

 

value>http://localhost/DocumentManagementWS/DMSService.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_CssWS_CSSWebService" serializeAs="String">

 

<

 

value>http://localhost/CssWS/CSSWebService.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_OrderDataWS_OrderDataWS" serializeAs="String">

 

<

 

value>http://localhost/OrderDataWS/OrderDataWS.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_OrderCatalogWS_OrderCatalogWS"

 

 

 

serializeAs="String">

 

<

 

value>http://localhost/OrderCatalogWS/OrderCatalogWS.asmx</value>

 

</

 

setting>

 

<

 

setting name="WorklistHandler_OrderHistoryWS_OrderHistoryWS"

 

 

 

serializeAs="String">

 

<

 

value>http://localhost/OrderHistoryWS/OrderHistoryWS.asmx</value>

 

</

 

setting>

 

</

 

WorklistHandler.Properties.Settings>

 

<

 

GPI.WorkflowService.Interface.InternalWF.WSComms.Properties.Settings>

 

<

 

setting name="WorkflowWSCommsService_OrderHistoryWS_OrderHistoryWS"

 

 

 

serializeAs="String">

 

<

 

value>http://localhost/OrderHistoryWS/OrderHistoryWS.asmx</value>

 

</

 

setting>

 

</

 

GPI.WorkflowService.Interface.InternalWF.WSComms.Properties.Settings>

 

</

 

applicationSettings>

 

<

 

system.codedom>

 

<

 

compilers>

 

<

 

compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">

 

<

 

providerOption name="CompilerVersion" value="v3.5" />

 

<

 

providerOption name="WarnAsError" value="false" />

 

</

 

compiler>

 

</

 

compilers>

 

</

 

system.codedom>

 

<

 

system.webServer>

 

<

 

validation validateIntegratedModeConfiguration="false" />

 

<

 

modules>

 

<

 

remove name="ScriptModule" />

 

<

 

add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />

 

</

 

modules>

 

<

 

handlers>

 

<

 

remove name="WebServiceHandlerFactory-Integrated" />

 

<

 

remove name="ScriptHandlerFactory" />

 

<

 

remove name="ScriptHandlerFactoryAppServices" />

 

<

 

remove name="ScriptResource" />

 

<

 

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

 

<

 

add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />

 

</

 

handlers>

 

</

 

system.webServer>

 

<

 

runtime>

 

<

 

assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

 

</

 

dependentAssembly>

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

 

</

 

dependentAssembly>

 

</

 

assemblyBinding>

 

</

 

runtime>

 

<

 

location path="Telerik.RadUploadProgressHandler.ashx">

 

<

 

system.web>

 

<

 

authorization>

 

<

 

allow users="*"/>

 

</

 

authorization >

 

</

 

system.web>

 

</

 

location>

 

</

 

configuration>

 

Genady Sergeev
Telerik team
 answered on 09 Oct 2009
1 answer
86 views
Hi please help me..

I have a link button with a command name of "EditDateTime" it doesnt fire the onitemcommand event on CHROME. It works fine on other browsers.

    protected void grdSurvey_ItemCommand(object source, GridCommandEventArgs e)
    {
    if (e.CommandName == "EditDateTime")
        {
        }
}

Thanks!
Nikolay Rusev
Telerik team
 answered on 09 Oct 2009
7 answers
183 views
Hi, I'm using client side binding with some web services registered in a RadScript manager.
All the web services return an XmlNode, and have their ResponseType set to Xml.
I can get the data fine, the problem is when I call set_dataSource and then dataBind, now rows appear in the tables.
I have autoGenerateColumns set to true in the grid.

What is the preferred method of binding a grid directly to the xml returned by the web service?
Nikolay Rusev
Telerik team
 answered on 09 Oct 2009
1 answer
124 views

Hi,
I am using Visual Studio 2005, Rad Conrtols for ASP.NET Q1 2008 and .net Framework 2.0 and C# Programming.
I am editing Rad Grid using User Control Form. I have a problem when editing dropdown list item.
When I click the edit command button on the grid, the User Control form shows up. All the Text boxes are filled with the correct values. But, the dropdown List which is databound in Code behind always shows the first value in the dropdownlist.
Is there a way to set the selected Value of the Dropdown list to show the current value of the cell in Grid.
Also can you please let me know what event is fired when the edit command button is clicked?


Thanks,
RKS
Princy
Top achievements
Rank 2
 answered on 09 Oct 2009
4 answers
265 views

Hi,
I'm considering using the RadTreeView (Version Q2 2009) in my projects, but I have some problems trying to replace node text with HTML table client-side. For example: I have to display a hierarchy of directories with the size of each directory right-aligned near the directory name.
I cannot use templates because I add items via web service.
I use the OnClientNodePopulated client-side event to add HTML tables inside nodes, but the table is rendered below the node image!
I spent several hours trying to create a custom skin to solve this problem, but with no results.
Can you help me?
Thanks in advance,
Nazareno.

This is the code of my ASP.NET page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript">
        function RadTreeView1_ClientNodePopulated(sender, eventArgs) {
            var parentnode = eventArgs.get_node();
            var childnodes = parentnode.get_nodes();
            for (var i = 0; i < childnodes.get_count(); i++) {
                var childnode = childnodes.getNode(i);
                childnode.get_textElement().innerHTML =
                "<table width=\"100%\"><tr><td>"
                + childnode.get_text() +
                "</td><td align=\"right\">"
                + childnode.get_attributes().getAttribute("LastWriteTime") +
                "</td></tr></table>";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
    </asp:ScriptManager>
    <div>
        <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="400" Height="400" OnClientNodePopulated="RadTreeView1_ClientNodePopulated">
            <Nodes>
                <telerik:RadTreeNode runat="server" ExpandMode="WebService" Text="C:" ToolTip="C:"
                    Value="C:\\" ImageUrl="folder.png" ExpandedImageUrl="folder_open.png">
                </telerik:RadTreeNode>
            </Nodes>
            <WebServiceSettings Path="WebService1.asmx" Method="GetDirectories" />
        </telerik:RadTreeView>

    </div>
    </form>
</body>
</html>

This is the code of my web service:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using Telerik.Web.UI;
using System.IO;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService {

    [WebMethod]
    public RadTreeNodeData[] GetDirectories(RadTreeNodeData node, object context)
    {
        // extract the "context" dictionary information. OnClientNodePopulating event loads the dictionary
        IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;
        // create the array of RadTreeNodeData that will be returned by this method
        List<RadTreeNodeData> result = new List<RadTreeNodeData>();

        // Make a reference to a directory.
        DirectoryInfo di = new DirectoryInfo(node.Value);

        // Get a reference to each directory in that directory.
        DirectoryInfo[] diArr = di.GetDirectories();

        // Returns the names of the directories.
        foreach (DirectoryInfo dri in diArr)
        {
            RadTreeNodeData nodeData = new RadTreeNodeData();
            nodeData.Text = dri.Name;
            nodeData.Value = dri.FullName;
            nodeData.Attributes.Add("LastWriteTime", dri.LastWriteTime.ToString());
            nodeData.ExpandMode = TreeNodeExpandMode.WebService;
            nodeData.ImageUrl = "folder.png";
            nodeData.ExpandedImageUrl = "folder_open.png";

            result.Add(nodeData);
        }

        return result.ToArray();
    }   
}

Atanas Korchev
Telerik team
 answered on 09 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?