Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
170 views
I'm getting the "Selection out of range" in the combobox. I have set values:

<telerik:RadComboBox width="150px" runat="server" ID="ddlProjectType" AppendDataBoundItems="true" OnI SelectedValue='<%# Bind("ProjectType") %>'
                        <Items> 
                            <telerik:RadComboBoxItem Text="Select a Value..." Value="" /> 
                            <telerik:RadComboBoxItem Text="Interstate" Value="0" /> 
                            <telerik:RadComboBoxItem Text="Intrastate" Value="1" /> 
                        </Items> 
                    </telerik:RadComboBox> 


I've tried with and without AppendDataBoundItems. I've not tried the clear method because I'm not sure where that would go (which event?). I have a sneaking suspicion this is being caused by the fact that the "ProjectType" property in my business entity is of a type of enum.
My enum:
public enum enProjectType 
    { 
        Interstate = 0, 
        Intrastate 
    } 


My Bound object property:
public enProjectType ProjectType { getset; } 

If this is the problem, is there a way to cast to an int or something to make this work?

Here is a copy of the full stacktrace:
[ArgumentOutOfRangeException: Selection out of range
Parameter name: value]
   Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +259
   Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +10
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +83
   Telerik.Web.UI.RadComboBox.PerformSelect() +34
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.WebControls.FormView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1461
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.FormView.PerformDataBinding(IEnumerable data) +12
   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
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.WebControls.FormView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.FormView.EnsureDataBound() +166
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Thank in advance!


Michael
Top achievements
Rank 1
 answered on 07 Apr 2009
1 answer
121 views
We would like to use Multicolumn Combo. There are n number of examples available for this but I would like to use Multicolumn Combo with Page Method.

For the optimization purposed I have created a separate aspx page and in that page our web method resides and combo box sits in the main page. Please let me know if Multicolumn combo like http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx
is possible with page method example like this http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx .

If it is possible to do then how to do that.
Veselin Vasilev
Telerik team
 answered on 07 Apr 2009
1 answer
138 views
hi team telerik
when i change menu in to rtl Width child menu is not current and Flow and ExpandDirection
i set that in code behind and clientside
    <telerik:RadMenu ID="RadMenu1" runat="server"  OnClientItemPopulating="itemPopulating"  
            
              Flow="Vertical" style="top: 0px; left: 0px" dir="rtl"
              <DefaultGroupSettings Flow="Vertical" Width="200" ExpandDirection="Left"    /> 
            <WebServiceSettings Path="~/RTLSite/UserControlRTL/MenuWebService.asmx" Method="GetMenuCategories" /> 
            <LoadingStatusTemplate> 
                <asp:Image runat="server" ID="LoadingImage" ImageUrl="~/RTLSite/UserControlRTL/Images/loading1.gif" ToolTip="Loading..."  /> 
            </LoadingStatusTemplate> 
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
               
               
        </telerik:RadMenu> 
 
 private void LoadRootNodes() 
    { 
         
 
        SqlConnection connection = new SqlConnection( 
        ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); 
 
        SqlCommand selectCommand = new SqlCommand("Menu_Select_FirstLevel_Site", connection); 
        selectCommand.CommandType = CommandType.StoredProcedure; 
       
        selectCommand.Parameters.AddWithValue("intContentlId", StrContentCodeId); 
 
        SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); 
        DataTable data = new DataTable(); 
        adapter.Fill(data); 
 
        foreach (DataRow row in data.Rows) 
        { 
 
            RadMenuItem menuSiteItem = new RadMenuItem(); 
            menuSiteItem.Text = row["strMenuName"].ToString(); 
            menuSiteItem.Value = row["MenuId"].ToString() + "_" + row["strMenuType"].ToString(); 
            menuSiteItem.ExpandMode = MenuItemExpandMode.WebService; 
 
            //if (row["ChildrenCount"].ToString() == "0") 
            //    node.ExpandedImageUrl = "image"
           // menuSiteItem.GroupSettings.ExpandDirection = ExpandDirection.Left; 
            menuSiteItem.Width = 200
           // menuSiteItem.GroupSettings.Width = 200
            //menuSiteItem.GroupSettings.Flow = ItemFlow.Vertical; 
            RadMenu1.Items.Add(menuSiteItem); 
        }//foreach 
       
    } 
 
 
webservice 
 public RadMenuItemData[] GetMenuCategories(RadMenuItemData item, object context) 
    { 
        IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context; 
 
        DataTable productCategories = GetNodeContent(item.Value.Split('_')[0], contextDictionary["ContentId"].ToString());// System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(contextDictionary["ContentId"].ToString()))); 
 
        List<RadMenuItemData> result = new List<RadMenuItemData>(); 
 
        foreach (DataRow row in productCategories.Rows) 
        { 
            RadMenuItemData itemData = new RadMenuItemData(); 
            itemData.Text = row["strMenuName"].ToString(); 
            itemData.Value = row["MenuId"].ToString() + "_" + row["strMenuType"].ToString(); 
             
            if (Convert.ToInt32(row["ChildrenCount"]) > 0) 
            { 
 
                itemData.ExpandMode = MenuItemExpandMode.WebService; 
 
            } 
            itemData.PostBack = true
            result.Add(itemData); 
        } 
 
        return result.ToArray(); 
    } 
 

please see link picture

http://g.imagehost.org/0021/menuerror.jpg
http://f.imagehost.org/0607/menuerror1.jpg
http://f.imagehost.org/0632/menuerror2.jpg
http://f.imagehost.org/0036/menuerror3.jpg



Kamen Bundev
Telerik team
 answered on 07 Apr 2009
0 answers
68 views
I'm currently working on doing some testing on a site using the Rad Editor controls for forums and new posts and have run into an issue.
I'm experiencing serious display issues in Opera.

Mainly the Rad Editor content extends beyond the bottom border and overlaps the text positioned below it.
I can see the main content is expanding beyond the bottom edge and corners by almost 50 pixels.
Resizing carefully can put the borders back in the right position, but that isn't really a good experience for the user.

I found a fix by adjusting the height for this exact same issue in Safari, but in Opera --- No luck.

Curious what exactly the claimed support for Opera may be and if this is a known issue.
Chris
Top achievements
Rank 1
 asked on 07 Apr 2009
0 answers
43 views
I'm currently working on doing some testing on a site using the Rad Editor controls for forums and new posts and have run into an issue.
I'm experiencing serious display issues in Opera.

Mainly the Rad Editor content extends beyond the bottom border and overlaps the text positioned below it.
I can see the main content is expanding beyond the bottom edge and corners by almost 50 pixels.
Resizing carefully can put the borders back in the right position, but that isn't really a good experience for the user.

I found a fix by adjusting the height for this exact same issue in Safari, but in Opera --- No luck.

Curious what exactly the claimed support for Opera may be and if this is a known issue.
Chris
Top achievements
Rank 1
 asked on 07 Apr 2009
5 answers
178 views
I have a radcombobox with a fixed height and width.
in some cases I need to make the property enabled="false" in prerender.
Combobox is getting disabled but the height and width is increasing.
After this I noticed that if I fire any other events combobox will be in normal height and width.
skin used is "default".
do I need to make any changes in 

.ComboBoxItemDisabled_Default in the script.
I am using IE-7

PLease help me to get the normal height and width of radcombobox.

Thanks
Jojy

Jojy
Top achievements
Rank 1
 answered on 07 Apr 2009
1 answer
73 views
Im using a FormDecorator in an ASP,NET application, and Im having issues with the rendering of fieldset html

In FF all is as expected

in IE7 the left and right hand borders of the fieldset extend beyond the top and bottom border. The more html there is inside the fieldset the further the left/right borders extend too far.

Does anyone have a clue as to why this is happening ?

Thanks

Dean
Georgi Tunev
Telerik team
 answered on 07 Apr 2009
5 answers
205 views
Hi,

Do we have same docking functionality just like we have in visual studio's Solution Explorer and Toolbox docking.
We have this in our windows application forms control but I could not find it in demo of web application controls toolkit!

Regards,
Divyesh Chapaneri
Brad
Top achievements
Rank 2
 answered on 07 Apr 2009
1 answer
156 views
Hi,

I need to change radalert window icon and radalert ok button style and color. How can i do this? if possible, provide some sample code.

thanks in advance.

Fakhrul
Georgi Tunev
Telerik team
 answered on 07 Apr 2009
1 answer
179 views

Dear all,

I have an scenario where there is a radtreeview on left and raddockzone on right.

user can drag node from treeview and drop it on raddockzone at particular place.

i done some work and for vertical orientation it is working fine,  but i want horizontal layout and let user drop two docks on a row, but this i couldnt acheive.

my aspx and code are below.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DockAndTreeView.aspx.cs" Inherits="testRAD.DockAndTreeView" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>    
<!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>    
    <title>Untitled Page</title>    
    <script type="text/javascript">     
    var currentTreeView;     
    var previousZone;     
    var currentZone;     
    function onNodeDragging(sender, args)     
    {     
        currentTreeView = sender;     
        var target = args.get_htmlElement();     
            
        var zone = null;     
        var parentNode = target;     
        while (parentNode != null)     
        {     
            if(parentNode.id)     
            {     
                if($find(parentNode.id))     
                {     
                    if(Object.getTypeName($find(parentNode.id)) == "Telerik.Web.UI.RadDockZone")                     
                    {     
                        zone = $find(parentNode.id);     
                        break;     
                    }     
                }      
            }     
            parentNodeparentNode = parentNode.parentNode;     
        }     
    
        if(previousZone != null)     
        {     
            previousZone._hidePlaceholder();     
            previousZonenull;     
        }     
        if(zone != null)     
        {     
            zone._showPlaceholder(args._node);     
            previousZone = zone;     
            currentZone = zone;     
        }          
    }  
    function onClientNodeDropping(sender, eventArgs)  
    {                 
        var command = {};  
        htmlElement = eventArgs.get_htmlElement();            
                                      
        if(eventArgs.destinationNode && (eventArgs.destinationNode.get_allowDrop() || sender._draggingPosition != "over") && eventArgs.destinationNode.get_isEnabled())  
        {             
            if(eventArgs.destinationNode._getControl() == this)  
            {                 
                command.commandName = "NodeDrop";  
            }  
            else  
            {  
                command.commandName = "NodeDropOnTree";          
            }  
        }             
        else if(htmlElement.id && htmlElement.id != "")  
        {  
            command.commandName = "NodeDropOnHtmlElement";  
        }   
        if(!command.commandName)  
        {         
            if (currentZone!=null)  
            {             
                currentZone._hidePlaceholder();  
            }  
        }  
    }  
     
    function onNodeDropped(obj, args)     
    {     
        if (currentZone!=null)  
        {  
            $get("currentZoneTB").value = currentZone.get_id();     
            currentZone._hidePlaceholder();     
        }  
    }     
    </script>    
</head>    
<body>    
    <form id="form1" runat="server" style="overflow:scroll">     
        <asp:ScriptManager ID="ScriptManager1" runat="server">     
        </asp:ScriptManager>    
        <%--hidden inputs used to exchange data with server: Place holder position and currentZone--%>    
        <input type="text" id="currentPlaceholderPosition" runat="server" style="display:none"/>     
        <input type="text" id="currentZoneTB" runat="server" style="display:none" />    
             
        <telerik:RadTreeView ID="RadTreeView1" runat="server"    
                     
             EnableDragAndDrop="True"    
             OnNodeDrop="RadTreeView1_HandleDrop"    
             OnClientNodeDropping="onClientNodeDropping" 
             OnClientNodeDropped="onNodeDropped"      
             OnClientNodeDragging="onNodeDragging">    
                        <Nodes>    
                            <telerik:RadTreeNode Text="Node1" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node2" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node3" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node4" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node5" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node6" PostBack="true"></telerik:RadTreeNode>    
                            <telerik:RadTreeNode Text="Node7" PostBack="true"></telerik:RadTreeNode>    
                        </Nodes>    
                </telerik:RadTreeView>    
                 
            <telerik:RadDockLayout runat="server" ID="RadDockLayout1"    
             onsavedocklayout="RadDockLayout1_SaveDockLayout"    
            onloaddocklayout="RadDockLayout1_LoadDockLayout" >    
                <telerik:RadDockZone runat="server" ID="RadDockZone1"      
                Width="800px" MinHeight="300px" style="float:left" Orientation="Horizontal">     
                </telerik:RadDockZone>                                     
                <%--<telerik:RadDockZone runat="server" ID="RadDockZone2" Width="400px" MinHeight="300px">     
                           
                </telerik:RadDockZone>       
              --%> 
                     <div style="display:none">     
                        Hidden UpdatePanel, which is used to receive the new dock controls.      
                        We will move them with script to the desired initial dock zone.     
                        <asp:updatepanel runat="server" id="UpdatePanel1">     
                            <triggers>    
                                <asp:asyncpostbacktrigger controlid="RadTreeView1" eventname="NodeDrop" />    
                            </triggers>    
                </asp:updatepanel>    
            </div>    
               
        </telerik:RadDockLayout>    
        <script type="text/javascript">     
       var isNodeDragged = false;     
       //parameter can be dock or treeNode     
       function Telerik.Web.UI.RadDockZone.prototype._showPlaceholder(obj, location)     
        {       
            if(Object.getTypeName(obj) == "Telerik.Web.UI.RadTreeNode")     
            {     
                isNodeDragged = true;     
                var node = obj;     
                this._repositionPlaceholder(node.get_element(), location);     
                var placeholderStyle = this._placeholder.style;     
                placeholderStyle.height = "30px";     
                placeholderStyle.width = "100%";     
                placeholderStyle.display = "block";     
                isNodeDragged = false;     
            }     
            else     
            {        
                var dock = obj;     
                this._repositionPlaceholder(dock.get_element(), location);     
                var dockdockBounds = dock._getBoundsWithBorderAndMargin();     
                var placeholderMargin = dock._getMarginBox(this._placeholder);     
                var placeholderBorder = dock._getBorderBox(this._placeholder);     
                var horizontal = this.get_isHorizontal();     
                var placeholderStyle = this._placeholder.style;     
                placeholderStyle.height = dockBounds.height - (placeholderMargin.vertical + placeholderBorder.vertical) + "px";     
                placeholderStyle.width = this.get_fitDocks() && !horizontal ? "100%" : dockBounds.width - (placeholderMargin.horizontal + placeholderBorder.horizontal) + "px";     
                placeholderStyle.display = "block";     
            }     
        }    
           
    Telerik.Web.UI.RadDockZone.prototype._repositionPlaceholder = function(dock_element, location)//TEKI: Add location  
    {  
         //fix TreeNode drag     
        if(isNodeDragged == true)     
        {        
            location = new Sys.UI.Point(currentTreeView._mousePos.x, currentTreeView._mousePos.y);           
        }        
        //end fix     
 
        var nearestChild = this._findItemAt(location, dock_element);  
 
        var zone_element = this.get_element();  
 
        if (null == nearestChild)  
        {  
            //Bug fix: ID 9516  
            // _clearElement must be after all docks and _placeholder  
            zone_element.insertBefore(this._placeholder, this._clearElement);  
        }  
        else  
        {  
            if(nearestChild.previousSibling != this._placeholder)  
            {  
                zone_element.insertBefore(this._placeholder, nearestChild);  
            }  
        }  
        //GET placeholder position     
        for(var i = 0;i < zone_element.childNodes.length; i++)     
        {     
            if(zone_element.childNodes[i] == this._placeholder)     
            {     
                var currentPos = i;  
                document.title = currentPos - 2;     
                $get('currentPlaceholderPosition').value = currentPos - 2;        
            }     
        }     
        //end Get   
    }           
        
        </script>    
    </form>    
</body>    
</html>    
    
 
using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using Telerik.Web.UI;  
using System.Collections.Generic;  
 
namespace testRAD  
{  
    public partial class DockAndTreeView : System.Web.UI.Page  
    {  
        private List<DockState> CurrentDockStates  
        {  
            get 
            {  
                //Store the info about the added docks in the session. For real life     
                // applications we recommend using database or other storage medium      
                // for persisting this information.     
                List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStatesMyPortal"];  
                if (Object.Equals(_currentDockStates, null))  
                {  
                    _currentDockStates = new List<DockState>();  
                    Session["CurrentDockStatesMyPortal"] = _currentDockStates;  
                }  
                return _currentDockStates;  
            }  
            set 
            {  
                Session["CurrentDockStatesMyPortal"] = value;  
            }  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
 
        protected void Page_Init(object sender, EventArgs e)  
        {  
            //Recreate the docks in order to ensure their proper operation     
            for (int i = 0; i < CurrentDockStates.Count; i++)  
            {  
                if (CurrentDockStates[i].Closed == false)  
                {  
                    RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);  
                    //We will just add the RadDock control to the RadDockLayout.     
                    // You could use any other control for that purpose, just ensure     
                    // that it is inside the RadDockLayout control.     
                    // The RadDockLayout control will automatically move the RadDock     
                    // controls to their corresponding zone in the LoadDockLayout     
                    // event (see below).     
                    RadDockLayout1.Controls.Add(dock);  
                    //We want to save the dock state every time a dock is moved.     
                    CreateSaveStateTrigger(dock);  
 
                }  
            }  
        }  
 
        protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)  
        {  
            //Populate the event args with the state information. The RadDockLayout control     
            // will automatically move the docks according that information.     
            foreach (DockState state in CurrentDockStates)  
            {  
                e.Positions[state.UniqueName] = state.DockZoneID;  
                e.Indices[state.UniqueName] = state.Index;  
            }  
        }  
 
        protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)  
        {  
            //Save the dock state in the session. This will enable us      
            // to recreate the dock in the next Page_Init.      
            CurrentDockStates = RadDockLayout1.GetRegisteredDocksState();  
        }  
 
        private RadDock CreateRadDockFromState(DockState state)  
        {  
            RadDock dock = new RadDock();  
            dock.ID = string.Format("RadDock{0}", state.UniqueName);  
            dock.ApplyState(state);  
            dock.Command += new DockCommandEventHandler(dock_Command);  
            dock.Commands.Add(new DockCloseCommand());  
            dock.Commands.Add(new DockExpandCollapseCommand());  
              
 
            return dock;  
        }  
 
 
        void dock_Command(object sender, DockCommandEventArgs e)  
        {  
            if (e.Command.Name == "Close")  
            {  
                ScriptManager.RegisterStartupScript(  
                UpdatePanel1,  
                this.GetType(),  
                "RemoveDock",  
                string.Format(@"function _removeDock() {{  
    Sys.Application.remove_load(_removeDock);  
    $find('{0}').undock();  
    $get('{1}').appendChild($get('{0}'));  
    $find('{0}').doPostBack('DockPositionChanged');  
}};  
Sys.Application.add_load(_removeDock);", ((RadDock)sender).ClientID, UpdatePanel1.ClientID),  
                true);  
 
            }  
        }  
 
        private void CreateSaveStateTrigger(RadDock dock)  
        {  
            //Ensure that the RadDock control will initiate postback     
            // when its position changes on the client or any of the commands is clicked.     
            //Using the trigger we will "ajaxify" that postback.     
            dock.AutoPostBack = true;  
            dock.CommandsAutoPostBack = true;  
 
            AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger();  
            saveStateTrigger.ControlID = dock.ID;  
            saveStateTrigger.EventName = "DockPositionChanged";  
            UpdatePanel1.Triggers.Add(saveStateTrigger);  
 
            saveStateTrigger = new AsyncPostBackTrigger();  
            saveStateTrigger.ControlID = dock.ID;  
            saveStateTrigger.EventName = "Command";  
            UpdatePanel1.Triggers.Add(saveStateTrigger);  
        }  
 
 
        protected void ButtonAddDock_Click(object sender, EventArgs e)  
        {  
 
        }  
 
        protected void RadTreeView1_HandleDrop(object sender, RadTreeNodeDragDropEventArgs e)  
        {  
            if (!string.IsNullOrEmpty(e.HtmlElementID))  
            {  
                RadTreeNode sourceNode = e.SourceDragNode;  
                int currentPos = int.Parse(currentPlaceholderPosition.Value);  
 
 
                int docksCount = CurrentDockStates.Count;  
 
                RadDock dock = new RadDock();  
                dock.UniqueName = Guid.NewGuid().ToString();  
                dock.ID = string.Format("RadDock{0}", dock.UniqueName);  
                dock.Title = "Dock" + docksCount.ToString();  
                dock.Text = sourceNode.Text;  
                dock.Width = Unit.Pixel(300);  
                dock.DockMode = DockMode.Docked;  
                dock.Commands.Add(new DockCloseCommand());  
                dock.Commands.Add(new DockExpandCollapseCommand());  
                dock.Command += new DockCommandEventHandler(dock_Command);  
 
                UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);  
 
 
                ScriptManager.RegisterStartupScript(  
                dock,  
                this.GetType(),  
                "AddDock",  
                string.Format(@"function _addDock() {{  
    Sys.Application.remove_load(_addDock);  
    $find('{1}').dock($find('{0}'),{2});   
    $find('{0}').doPostBack('DockPositionChanged');  
 
}};  
Sys.Application.add_load(_addDock);", dock.ClientID, currentZoneTB.Value, currentPos),  
                true);  
 
                CreateSaveStateTrigger(dock);  
            }  
        }     
    }  
}  
 


Kindly help me acheive this scenario...
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 07 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?