Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views
hello, 

i want to set default size in Dropdownlist Size using tool file:

iam using this code:
<script type='text/javascript'>
        function OnClientLoad(editor, args) {
           
            var fontFamily = editor.getToolByName("FontName");
            var fontSize = editor.getToolByName("FontSize");
            var timeout = (document.all) ? timeout = 0 : timeout = 1000;
            setTimeout(function () {
                fontFamily._element.getElementsByTagName("span")[0].innerHTML = "Arial"; 
                fontSize._element.getElementsByTagName("span")[0].innerHTML = "2";
            }, timeout);
        }</script>

i can set default size (1.jpg File Attach), but when i write some word in Editor, the Size is changed to "Size" and RealFontSize is Changed (2.jpg File Attach).

Please Help me to resolve  Set Default Size ( not real font size) and do not change.

this is content of toolfile.xml:

<root>
<tools name="MainToolbar" dockable="true" enabled="true">
<tool name="AjaxSpellCheck" />
<tool name="FindAndReplace" />
<tool separator="true"/>
<tool name="Undo" />
<tool name="Redo" />
<tool separator="true"/>
<tool name="Cut" />
<tool name="Copy" />
<tool name="Paste" shortcut="CTRL+!"/>
</tools>

<tools name="Formatting" enabled="true" dockable="true">
<tool name="Bold" />
<tool name="Italic" />
<tool name="Underline" />
<tool separator="true"/>
<tool name="ForeColor" />
<tool name="BackColor"/>
<tool separator="true"/>
<tool name="FontName"/>
<tool name="FontSize"/>
<tool name="RealFontSize"/>   
</tools>

</root>
.



thanks So much!!


Shinu
Top achievements
Rank 2
 answered on 19 Aug 2013
1 answer
195 views
I have a grid where I hide rows on the client side based on a combobox selection.  Something like this:

var grid = $find('<%=MyGrid.ClientID %>');
var masterTableView = grid.get_masterTableView();
 
// iterate through the rows and then use the
masterTableView.showItem();
//and
masterTableView.hideItem()
//methods

When I do a biff export, all the data is exported, regardless of the visibility I just set on the rows client-side.

My goal is to keep the same rows hidden for the export.

My idea was to use the grid's BiffExporting event to manipulate the ExportInfrastructure.Table object, and hide the same rows.  Is this possible?  Or am I going about this the wrong way?  I'm not even sure the visibility of the rows is available to me server side since I set them on the client side...
Princy
Top achievements
Rank 2
 answered on 19 Aug 2013
6 answers
175 views
Hi All,

I am attempting to ajaxify specific controls dynamically. I have a repeater and i want to ajaxify image buttons inside the repeater.

On ItemCreated for the repeater i am:

protected void RptCategories_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                ImageButton imgbtn = (ImageButton)e.Item.FindControl("iBtnRemoveCategory");
                this.RadAjaxManager1.AjaxSettings.AddAjaxSetting(imgbtn, RptCategories, RadAjaxLoadingPanel1);
            }
        }

The line where i am adding the AjaxSetting i am getting the error: ArgumentNullException was unhandled by user code, value cannot be null, Parameter Page.

It seems the RadAjaxManager doesn't know where it is.. this is a form page with a masterpage.. no usercontrols..Please help. THanks.

James
Top achievements
Rank 1
 answered on 19 Aug 2013
4 answers
140 views
I have problems using the RadAjaxManager in a CMS called "Umbraco".

when I want to add ajaxsetting in umbraco page dynamically, I got some error .
 
[ArgumentNullException: Value cannot be null. Parameter name: page] Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page) +170 Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel) +294 

here is my simple code

public partial class ProductListSetting :   UmbracoEnsuredPage
    {
    protected void Page_Load(object sender, EventArgs e)
        {
             
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(save, rgProductList,null);
        }
}


Thanks.


James
Top achievements
Rank 1
 answered on 19 Aug 2013
4 answers
242 views
Hi,

I have an asp repeater and i wanted to ajaxify the linkbutton on itemcreated but i am getting an error message. Can you please let me know what I am doing wrong?

Error: Value cannot be null, Parameter Page
at Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel, UpdatePanelRenderMode renderMode, Unit updatePanelHeight)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel, UpdatePanelRenderMode renderMode)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl)
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.rptAssetList_ItemCreated(Object sender, RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.OnItemCreated(RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.Repeater.DataBind()
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.BindAssetGrid()
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at com.celero.los_2.WebApp.PresentationLogic.UserControlBase.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at com.celero.los_2.WebApp.Framework.ModalPopup.ModalPopupControl.LoadContentControl()
at com.celero.los_2.WebApp.Framework.ModalPopup.ModalPopupControl.OpenPopup()
at com.celero.los_2.WebApp.Pages.Collateral.btnAddCollateralAsset_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Below is the HTML mark up
<asp:Repeater ID="rptAssetList" runat="server" EnableViewState="false" OnItemCommand="rptAssetList_ItemCommand" OnItemCreated="rptAssetList_ItemCreated">
    <ItemTemplate>
        <tr class="GridRow">
            <td>
                <asp:LinkButton ID="btnSelectAsset" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_TYPE")%>'
                    CommandName="Select" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_ID")%>'>
                </asp:LinkButton>
            </td>
            <td>
                <div>
                    <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
                </div>
            </td>
            <td>
                <div style="text-align: right;">
                    <%# DataBinder.Eval(Container.DataItem, "BALANCE", "{0:c}")%>
                </div>
            </td>
        </tr>
    </ItemTemplate>
    <AlternatingItemTemplate>
        <tr class="GridAlternRow">
            <td>
                <asp:LinkButton ID="btnSelectAsset" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_TYPE")%>'
                    CommandName="Select" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_ID")%>'>
                </asp:LinkButton>
            </td>
            <td>
                <div>
                    <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
                </div>
            </td>
            <td>
                <div style="text-align: right;">
                    <%# DataBinder.Eval(Container.DataItem, "BALANCE", "{0:c}")%>
                </div>
            </td>
        </tr>
    </AlternatingItemTemplate>
</asp:Repeater>

The code Behind. I'm bascially adding an ajax setting on the btnSelectAsset on 4 asp Panel below.
And the Error is "Value cannot be null"
protected void rptAssetList_ItemCreated(object sender, RepeaterItemEventArgs e)
{
 
    if (e.Item.ItemType == ListItemType.AlternatingItem ||
                                e.Item.ItemType == ListItemType.Item)
    {
        LinkButton btnSelectAsset = (LinkButton)e.Item.FindControl("btnSelectAsset");
        if (btnSelectAsset != null)
        {
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlShortTerm);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlPropertyFields);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlPpsa);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlVehicle);
        }
    }
}
James
Top achievements
Rank 1
 answered on 19 Aug 2013
2 answers
112 views
Hi,

I am creating telerik rad grid dynamically based on the columns present in the database.  Problem is, I need to attach an updatepanel.

The aspx page has the following code

 

<form id="aspnetForm" method="post" runat="server" style="overflow: hidden">

 

 

 

 

<asp:ScriptManager id="MainScriptManager" EnablePartialRendering="true" runat="server"></asp:ScriptManager>

 

 

 

 

<telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server" EnableAJAX="true">

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="TelerikAjaxLoadingPanel" runat="server" Height="75px" Width="75px" Transparency="50">

 

 

 

 

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 


In the code behind I am creating the grid by the following code.  Now I need to
specify the updatepanel for the grid (please see the red line below).  If ....

GridControlTelerik

Grid = UICommon.CreateMainetGridTelerik(this, SInfo.Name, RecordId, CanUpdate && !isReadOnly, controlStyles);

 

 

 

 

TelerikAjaxManager.AjaxSettings.AddAjaxSetting(Grid, Grid, TelerikAjaxLoadingPanel);

 

 

 

 

if (mainetGrid == null) break;

.......

I do this I get the following error:

 

Exception information:
Exception type: Telerik.Web.UI.
Exception message: Value cannot be null.
Parameter name: page

Thread information:
   at Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page)
   at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel)
   at Main_Edit.ArrangeFieldsForEdit(ArrayList screenInfoList, ArrayList FRequiredList) in D:\...\Main_Edit.aspx.cs:line 10185
   at Main_Edit.InitLegacyControls(ArrayList screenInfoList) in D:\...\Main_Edit.aspx.cs:line 3631
   at Main_Edit.SetupControls() in D:\...\Main_Edit.aspx.cs:line 3256
   at Main_Edit.Page_Init(Object sender, EventArgs e) in D:\...\Main_Edit.aspx.cs:line 808
   at System.Web.UI.Control.OnInit(EventArgs e)
   at System.Web.UI.Page.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint).

Can you please help me to fix this error. 

Regards,
Senthil

 

 

James
Top achievements
Rank 1
 answered on 19 Aug 2013
1 answer
80 views
Hi there,
       I want to remove the cell tooltip from the RadDatePicker. How can I have it done?? Would appreciate if someone could come up with a code snippet that helps..

thanks in advance
Savyo
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2013
7 answers
776 views
I've got a general ViewState question. Here's how I'm using Telerik and Ajax in my Web App.

1. Using an .aspx page as the shell that loads a web user control (.ascx) that acts as sort of a master page to additional (.ascx) pages based on what the user selects. So Master.ascx has a tree control and this tree envokes different .ascx pages to load on the right side of the page based on what users select.

2. I've got a class that is keeping a session variable to remember data based on user clicks

So, all is well until I open a second window and cut and paste the same exact URL into it. 
I'm not forced to login it just opens just like the original window.

Here's where it gets hairy. If I start to click in Window 2, I am able to load all of the secondary .ascx pages as I go without any issues. Now if I go back to Window 1 I get all sorts of errors referring to ViewState not being able to load.....

This error seems very generic and I'm unable to get to the bottom of it. Any ideas where I should start looking?

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
http://localhost/PDMPlanroom/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2
Line 15
Andrey
Telerik team
 answered on 19 Aug 2013
1 answer
78 views
Hi,

We have a requirement to spellcheck on form submission. Since the form is quite big, we had to use RadTabStrip to show the form in the multi tabs using RadMultiPage. I got the solution from here that triggers the spellcheck on form submission. However, this does not work if the RadEditor is in an inactive tab. Is there a way to achieve the spellcheck on hidden RadEditor on submission?

Thank you,

James
Ianko
Telerik team
 answered on 19 Aug 2013
4 answers
111 views

Hi Guys,

I am a new comer to this forum and I am new with this fantastic Telerik components. I have an issue loading the correct Skin from the multiple Skin that I have. The idea is that, I have a query to pull what Skin should be loaded, but the issue it is always loading the Default Skin. I inspect the CSS and it is being overridden by the WebResource. Below is the complete code:

C# code for RadDock declation:
public partial class _Default : System.Web.UI.Page
{
    public String lbl_error;
     
    protected void Page_Load(Object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            /*CCLibs*/
            CCDBLib ccDB = new CCDBLib();
            ccDB.ConnectionString = (String)Application["appDSN"];
            System.Data.SqlClient.SqlDataReader dr;
            /**/
             
             
             
             
            /*data that was passed in*/
            String prtGUID = Request["prt_GUID"];
            String scGUID = Request["sc_GUID"];
            String lngXMLDir = Request["lng_XMLDir"];
             
            if (lngXMLDir == "" || lngXMLDir == null)
            {
                lngXMLDir = "English";
            }
            /**/
             
             
             
             
            /*check score string*/
            DataCollectionLib.checkScoreGUID(prtGUID, scGUID, lngXMLDir, ccDB);
            /**/
             
             
             
             
            /*database variables*/
            int prtID; int prtSubjectID; int tolID; Boolean tolIsRole; String tolXMLCode; String tolBackgroundColor;
            String scRole; String prtName; String prtSubjectName; Boolean scPart1completed; String scScores;
             
            String query = @"
                    intentionally remove the query for confidentiality purpose
                    ";
             
            dr = ccDB.GetDataReader(query);
            dr.Read();
             
            prtID = (int)dr["prt_ID"];
            prtSubjectID = (int)dr["prt_subjectID"];
            tolID = (int)dr["tol_ID"];
            tolIsRole = (Boolean)dr["tol_isRole"];
            tolXMLCode = (String)dr["tol_XMLCode"];
            tolBackgroundColor = (String)dr["tol_backgroundColor"];
            scRole = (String)dr["sc_role"];
            prtName = (String)dr["emp_firstName"] + " " + (String)dr["emp_lastName"];
            prtSubjectName = (String)dr["emp_subjectFirstName"] + " " + (String)dr["emp_subjectLastName"];
            scPart1completed = (Boolean)dr["sc_part1completed"];
            scScores = (String)dr["sc_scores"];
            headerCustomControl.comWebLogo = dr["com_webLogo"] != DBNull.Value ? (String)dr["com_webLogo"] : ""; //must find a better way to check for null
            /**/
             
             
             
             
            /*SKIN*/
            switch (tolXMLCode)
            {
                case "pps":
                    RadDockLayout1.Skin = "Portrait";
                    break;
                case "pos":
                    RadDockLayout1.Skin = "PortraitOD";
                    break;
                case "fpps":
                    RadDockLayout1.Skin = "Portrait";
                    break;
                case "fpos":
                    RadDockLayout1.Skin = "PortraitOD";
                    break;
                case "epps":
                    RadDockLayout1.Skin = "PortraitEX";
                    break;
            }
            /**/
             
             
             
             
            /*XML*/
            HybridDictionary content = (HybridDictionary)Application["SDIContent"];
            HybridDictionary pageVals = DataCollectionLib.getPortraitPart2Screen(content, lngXMLDir);
            pageVals = (HybridDictionary)pageVals[tolXMLCode];
            HybridDictionary toolNames = DataCollectionLib.getToolNames(content, lngXMLDir);
            /**/
             
             
             
             
            /*initialize page variables*/
            lbl_tool.Text = (String)toolNames[tolXMLCode] + "<br />"; //welcome
            lbl_welcome.Text = (String)((HybridDictionary)pageVals["labels"])["welcome"]; //welcome
            lbl_prtName.Text = prtName + "<br />";
             
            if (prtID != prtSubjectID)
            {
                lbl_feedbackon.Text = (String)((HybridDictionary)pageVals["labels"])["feedbackon"]; //feedback on
                lbl_prtSubjectName.Text = prtSubjectName + "<br />";
            }
             
            if (tolIsRole)
            {
                lbl_role.Text = (String)((HybridDictionary)pageVals["labels"])["role"]; //role
                lbl_scRole.Text = scRole + "<br />";
            }
             
            lbl_introduction.Text = (String)((HybridDictionary)pageVals["labels"])["introduction"]; //introduction
             
            //message
            String messageText = (String)((HybridDictionary)pageVals["messages"])["1"];
            String viewPrintLinkText = (String)((HybridDictionary)pageVals["labels"])["viewprintlink"];
            messageText = messageText.Replace("%viewPrintLink", "<a href=\"/viewPrintStrengths.asp?tool=" + tolXMLCode + "&language=" + lngXMLDir + "\" target=\"_blank\">" + viewPrintLinkText + "</a>");
            lbl_message.Text = messageText;
             
            div_background.Style["background-color"] = tolBackgroundColor; //page background color
            lbl_expandAll.Text = (String)((HybridDictionary)pageVals["links"])["expandall"]; //expand all link
            lbl_collapseAll.Text = (String)((HybridDictionary)pageVals["links"])["collapseall"]; //expand all link
            lbl_most.Text = (String)((HybridDictionary)pageVals["labels"])["most"]; //most
            lbl_most2.Text = (String)((HybridDictionary)pageVals["labels"])["most"]; //most
            lbl_sometimes.Text = (String)((HybridDictionary)pageVals["labels"])["sometimes"]; //sometimes
            lbl_least.Text = (String)((HybridDictionary)pageVals["labels"])["least"]; //least
            lbl_least2.Text = (String)((HybridDictionary)pageVals["labels"])["least"]; //least
            bttn_nextButton.Value = (String)((HybridDictionary)pageVals["buttons"])["next"]; //next button
            lbl_error = (String)((HybridDictionary)pageVals["errors"])["placeallstrengths"]; //javascript error
            /**/
             
             
             
             
            /*hidden fields for passing to .asa page*/
            prt_GUID.Value = prtGUID;
            sc_GUID.Value = scGUID;
            lng_XMLDir.Value = lngXMLDir;
            /**/
             
             
             
             
            /*Strengths*/
            ArrayList strengthsList = new ArrayList();
             
            //load from XML file
            XmlDocument xmlDom = new XmlDocument();
            xmlDom.Load(Server.MapPath("/") + "/includes/XML/" + lngXMLDir + "/portrait.xml");
            XmlNode strengths = xmlDom.GetElementsByTagName(tolXMLCode)[0];
             
            foreach (XmlNode strength in strengths)
            {
                string number = strength.ChildNodes[0].InnerText;
                string name = strength.ChildNodes[1].InnerText;
                string description = strength.ChildNodes[2].InnerText;
                 
                strengthsList.Add(new SDIStrength(number, name, description));
            }
             
            //prepare score string
            String[] arrMost = arrMost = scScores.Split(new Char[] { ',' })[1].Split(new Char[] { '|' });
            String[] arrSometimes = arrSometimes = scScores.Split(new Char[] { ',' })[2].Split(new Char[] { '|' });
            String[] arrLeast = arrLeast = scScores.Split(new Char[] { ',' })[3].Split(new Char[] { '|' });
             
            Array.Sort(arrMost);
            Array.Sort(arrSometimes);
            Array.Sort(arrLeast);
             
            //create dock objects
            foreach (SDIStrength strength in strengthsList)
            {
                string number = strength.Number;
                string name = strength.Name;
                string description = strength.Description;
                 
                string ID = "Strength_" + number;
                Label label = new Label();
                label.Text = description; //"<div id=\"Handle_" + ID + "\" style=\"text-align:center;  cursor:move;\">" + name + "</div>";
                 
                RadDock dockObj = new RadDock();
                dockObj.Title = "<div style=\"text-align:left;\">" + name + "</div>";
                dockObj.ID = ID;
                dockObj.Width = Unit.Pixel(170);
                dockObj.Height = Unit.Pixel(110);
                RadDockLayout1.Controls.Add(dockObj);
                dockObj.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse; //Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse;
                dockObj.DockMode = Telerik.Web.UI.DockMode.Docked;
                dockObj.OnClientDockPositionChanged = "OnClientDockPositionChanged";
                dockObj.ContentContainer.Controls.Add(label);
                dockObj.Collapsed = true;
                dockObj.EnableAnimation= true;
                dockObj.ToolTip = label.Text;
                //dockObj.DockHandle = Telerik.Web.UI.DockHandle.None;
                //dockObj.OnClientInitialize = "SetHandleDock";
                 
                //place according to score string
                if (Array.BinarySearch(arrMost, number) >= 0)
                {
                    MostZone.Controls.Add(dockObj);
                }
                else if (Array.BinarySearch(arrSometimes, number) >= 0)
                {
                    SometimesZone.Controls.Add(dockObj);
                }
                else if (Array.BinarySearch(arrLeast, number) >= 0)
                {
                    LeastZone.Controls.Add(dockObj);
                }
            }
            /**/
             
             
             
             
            /*collapse all the dockable objects on start-up*/
            for (int dockIndex = 0; dockIndex < MostZone.Docks.Count; dockIndex++)
            {
                MostZone.Docks[dockIndex].Collapsed = true;
            }
             
            for (int dockIndex = 0; dockIndex < SometimesZone.Docks.Count; dockIndex++)
            {
                SometimesZone.Docks[dockIndex].Collapsed = true;
            }
             
            for (int dockIndex = 0; dockIndex < LeastZone.Docks.Count; dockIndex++)
            {
                LeastZone.Docks[dockIndex].Collapsed = true;
            }
            /**/
        }
    }
}


Here is my ASPX page:

<!DOCTYPE html>
<html lang="en">
 
<CC:Header id="headerCustomControl" runat="server" PageTitle="Portrait" PageWidth="980" />
 
<link rel="stylesheet" type="text/css" href="/RadControls/Skins/Portrait/Dock.Portrait.css" />
<link rel="stylesheet" type="text/css" href="/RadControls/Skins/PortraitEX/Dock.PortraitEX.css" />
<link rel="stylesheet" type="text/css" href="/RadControls/Skins/PortraitOD/Dock.PortraitOD.css" />
 
<script type="text/javascript" type="text/javascript">
    /*function SetHandleDock(dock, args)
    {
        dock.set_handle(document.getElementById("Handle_" + dock.get_id()));
    }*/
     
    function collapseZone(zoneID)
    {
        var thisZone = $find(zoneID);
        var arrDocks = thisZone.get_docks();
         
        for (var dockIndex = 0; dockIndex < arrDocks.length; dockIndex++)
        {
            arrDocks[dockIndex].set_collapsed(true);
        }
    }
     
     
     
     
    function expandZone(zoneID)
    {
        var thisZone = $find(zoneID);
        var arrDocks = thisZone.get_docks();
         
        for (var dockIndex = 0; dockIndex < arrDocks.length; dockIndex++)
        {
            arrDocks[dockIndex].set_collapsed(false);
        }
    }
     
     
     
     
    function collapseAll()
    {
        //first collapse the most, sometimes, and least zones
        collapseZone('MostZone');
        collapseZone('SometimesZone');
        collapseZone('LeastZone');
         
        //then collapse the 28 final zones...we need to get the strength number for each zone
        var numZones = 28;
         
        for (var zoneNumber = 1; zoneNumber <= numZones; zoneNumber++)
        {
            collapseZone('Zone' + zoneNumber);
        }
    }
     
     
     
     
    function expandAll()
    {
        //first expand the most, sometimes, and least zones
        expandZone('MostZone');
        expandZone('SometimesZone');
        expandZone('LeastZone');
         
        //then expand the 28 final zones...we need to get the strength number for each zone
        var numZones = 28;
         
        for (var zoneNumber = 1; zoneNumber <= numZones; zoneNumber++)
        {
            expandZone('Zone' + zoneNumber);
        }
    }
     
     
     
     
    function OnClientDockPositionChanged(dock)
    {
        var mostZone = $find('MostZone');
        var sometimesZone = $find('SometimesZone');
        var leastZone = $find('LeastZone');
        var regExp = new RegExp(/[\d]+$/);
        var zoneNumber;
         
        var thisZone = dock.get_parent();
         
        if (thisZone != mostZone && thisZone != sometimesZone && thisZone != leastZone)
        {
            //dock.set_collapsed(true);
            //dock.Width = 145;
             
            var arrObjs = thisZone.get_docks();
             
            for (var objIndex = 0; objIndex < arrObjs.length; objIndex++)
            {
                if (arrObjs[objIndex] != dock)
                {
                    //carefull...the DockTo() function triggers an OnClientDock event
                    zoneNumber = regExp.exec(thisZone.get_id())[0];
                     
                    if (zoneNumber >= 1 && zoneNumber <= 6)
                    {
                        mostZone.dock(arrObjs[objIndex]);
                        //arrObjs[objIndex].set_collapsed(false);
                        //arrObjs[objIndex].Width = 145;
                    }
                    else if (zoneNumber >= 7 && zoneNumber <= 22)
                    {
                        sometimesZone.dock(arrObjs[objIndex]);
                        //arrObjs[objIndex].set_collapsed(false);
                        //arrObjs[objIndex].Width = 145;
                    }
                    else if (zoneNumber >= 23 && zoneNumber <= 28)
                    {
                        leastZone.dock(arrObjs[objIndex]);
                        //arrObjs[objIndex].set_collapsed(false);
                        //arrObjs[objIndex].Width = 145;
                    }
                }
            }
        }
        else
        {
            //dock.set_collapsed(true);
            //dock.Width = 145;
        }
    }
     
     
     
     
    function verify(frm, bttn)
    {
        var errOut = false;
         
        //check to make sure that there are no strengths in the intermediate zones
        var mostZone = $find('MostZone');
        var sometimesZone = $find('SometimesZone');
        var leastZone = $find('LeastZone');
         
        if (mostZone.get_docks().length > 0 || sometimesZone.get_docks().length > 0 || leastZone.get_docks().length > 0)
        {
            self.alert("<%= lbl_error %>");
            errOut = true;
        }
        else
        {
            //there are 28 final zones...we need to get the strength number for each zone
            var numZones = 28;
            var arrScores = new Array(numZones);
            arrScores[0] = "-1";
            var regExp = new RegExp(/[\d]+$/);
             
            for (var zoneNumber = 1; zoneNumber <= numZones; zoneNumber++)
            {
                var thisZone = $find('Zone' + zoneNumber);
                 
                if (thisZone.get_docks().length != 1)
                {
                    //error...there should be one and only one strength in each zone
                    arrScores[zoneNumber] = "NULL";
                    errOut = true;
                }
                else
                {
                    //get the strength number by extracting it from the dockableObject's id
                    var thisStrength = thisZone.get_docks()[0];
                    arrScores[zoneNumber] = regExp.exec(thisStrength.get_id())[0];
                }
            }
             
            frm.sc_scores.value = arrScores.join("|");
        }
         
        if (!errOut)
        {
            bttn.disabled = true;
            //self.alert("FINAL SCORE STRING:\n" + frm.sc_scores.value);
            self.location.href = "/portraitPart2.asa?prt_GUID=" + frm.prt_GUID.value + "&" + "sc_GUID=" + frm.sc_GUID.value + "&" + "lng_XMLDir=" + frm.lng_XMLDir.value + "&" + "sc_scores=" + frm.sc_scores.value; //we need to seperate the & from the rest so that it passes XHTML restrictions
        }
    }
</script>
 
 
 
<form method="post" id="frmMain" runat="server">
 
<!--
    4/23/10 - Migrated From RadDock ASP.NET To ASP.NET AJAX
-->
 
<Telerik:RadScriptManager ID="ScriptManager" runat="server" />
 
<Telerik:RadDockLayout runat="server" ID="RadDockLayout1" EnableEmbeddedSkins="false">
 
<asp:Label ID="lbl_tool" runat="server" class="BigHeading"></asp:Label>
<img src="/images/trans.gif" width="1" height="5" alt="" /><br />
 
<asp:Label ID="lbl_welcome" runat="server" class="Heading"></asp:Label>
<asp:Label ID="lbl_prtName" runat="server"></asp:Label>
 
<asp:Label ID="lbl_feedbackon" runat="server" class="Heading"></asp:Label>
<asp:Label ID="lbl_prtSubjectName" runat="server"></asp:Label>
 
<asp:Label ID="lbl_role" runat="server" class="Heading"></asp:Label>
<asp:Label ID="lbl_scRole" runat="server"></asp:Label>
<img src="/images/trans.gif" width="1" height="5" alt="" /><br />
 
<table style="width:100%;" id="div_background" runat="server">
    <tr>
        <td>
            <table style="width:100%;" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <div>
                            <asp:Label ID="lbl_introduction" runat="server" class="Heading"></asp:Label>
                              <asp:Label ID="lbl_message" runat="server"></asp:Label>
                        </div>
                        <br />
                    </td>
                </tr>
            </table>
            <div style="text-align:right">
                <a class="smallLinks" href="javaScript:expandAll();"><asp:Label ID="lbl_expandAll" runat="server"></asp:Label></a>
                | <a class="smallLinks" href="javaScript:collapseAll();"><asp:Label ID="lbl_collapseAll" runat="server"></asp:Label></a>
            </div>
            <div style="text-align:center;">
                <table style="margin-left:auto; margin-right:auto;">
                    <tr style="vertical-align:top;">
                        <td style="text-align:center;">
                            <strong><asp:Label ID="lbl_most" runat="server"></asp:Label></strong></strong><br />
                            <Telerik:RadDockZone ID="MostZone" runat="server" Orientation="Horizontal" Width="340px" style="min-height:37px; _height:37px; margin-left:auto; margin-right:auto;"></Telerik:RadDockZone>
                        </td>
                        <td style="text-align:center;">
                            <strong><asp:Label ID="lbl_sometimes" runat="server"></asp:Label></strong><br />
                            <Telerik:RadDockZone ID="SometimesZone" runat="server" Orientation="Horizontal" Width="340px" style="min-height:37px; _height:37px; margin-left:auto; margin-right:auto;"></Telerik:RadDockZone>
                        </td>
                        <td style="text-align:center;">
                            <strong><asp:Label ID="lbl_least" runat="server"></asp:Label></strong><br />
                            <Telerik:RadDockZone ID="LeastZone" runat="server" Orientation="Horizontal" Width="340px" style="min-height:37px; _height:37px; margin-left:auto; margin-right:auto;"></Telerik:RadDockZone>
                        </td>
                    </tr>
                </table>
            </div>
            <table style="width:100%;">
                <tr style="vertical-align:top;">
                    <td colspan="3" style="text-align:center;">
                        <img src="/images/trans.gif" width="1" height="10" alt="" /><br />
                         
                        <table style="width:100%; text-align:center;">
                            <tr style="vertical-align:top;">
                                <td>
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td><strong><asp:Label ID="lbl_most2" runat="server"></asp:Label></strong></td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone1" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone2" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone3" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone4" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone5" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone6" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone7" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone8" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone9" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone10" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone11" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone12" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone13" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone14" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone15" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone16" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone17" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone18" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone19" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone20" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone21" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone22" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone23" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone24" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone25" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone26" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone27" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td>
                                                <Telerik:RadDockZone ID="Zone28" runat="server" Orientation="Horizontal" Width="170px" style="min-height:37px; _height:37px;">
                                                </Telerik:RadDockZone>
                                            </td>
                                        </tr>
                                    </table>
                                     
                                    <table style="margin-left:auto; margin-right:auto;">
                                        <tr>
                                            <td><strong><asp:Label ID="lbl_least2" runat="server"></asp:Label></strong></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <br />
             
        </td>
    </tr>
</table>
<br />
 
</Telerik:RadDockLayout>
 
 
 
 
<div style="text-align:center;">
    <input type="button" id="bttn_nextButton" value="" onclick="verify(this.form, this);" runat="server" />
</div>
 
<input type="hidden" name="prt_GUID"        id="prt_GUID"       value="" runat="server" />
<input type="hidden" name="sc_GUID"         id="sc_GUID"        value="" runat="server" />
<input type="hidden" name="lng_XMLDir"      id="lng_XMLDir"     value="" runat="server" />
<input type="hidden" name="sc_scores"       id="sc_scores"      value="" runat="server" />
</form>


Did I miss something? Thanks for your help.
Slav
Telerik team
 answered on 19 Aug 2013
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?