Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
95 views
Hi,

I have got a rad combo box in a page and after post back the rad combo width got decreased. I have tried your KB article
http://www.telerik.com/support/kb/aspnet-ajax/combobox/radcombobox-changes-width-height.aspx

but on running the page i am getting a java script error combo.FixUp is not a function .I am using rad controls of version 2010.1.519.40.If this version of controls does not support this fix up function is there any other solution?
deepak
Top achievements
Rank 2
 answered on 24 Jun 2011
5 answers
394 views
 Hello,

I am using Telerik PanelBar. I am using the version of 2010.3.1317.20. I cant upgrade to the latest version as the framework I am using .Net 2.0.

I have added the PanelBar in the MasterPage, When i Click on any of the item in the panel bar, the Click event is not firing.

The panelbar is populated at runtime. also the NavigateUri is set at runtime.

<telerik:RadPanelBar runat="server" ID="RadPanelNavBar" Visible="false" ExpandMode="MultipleExpandedItems" 
                                        OnItemClick="RadPanelNavBar_ItemClick" EnableViewState="true">
                                </telerik:RadPanelBar>

the below code is how i am adding the RadPanelItems

For Each mnuChildRow As DataRow In dtFilterData.Rows
                                Dim menuAdminChild As New RadPanelItem()                                
                                menuAdminChild.Text = mnuChildRow.Item(Field.DisplayName).ToString()
                                menuAdminChild.NavigateUrl = "../" + mnuChildRow.Item(Field.ResourceName).ToString()
                                menuMFGHeader.Items.Add(menuAdminChild)
                            Next

The click event is below

Protected Sub RadPanelNavBar_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelNavBar.ItemClick
        If e.Item.Items.Count > 0 Then
            If e.Item.Expanded = False Then
                'Label1.Text = "Collapsed panel item - " + e.Item.Text
            Else
                'Label1.Text = "Expanded panel item - " + e.Item.Text
            End If
        Else
            'Label1.Text = "Clicked panel item - " + e.Item.Text
        End If
    End Sub

What finally i require is to have the RadPanelItem as selected on which the user last clicked. rest all remains un selected.

Helen
Telerik team
 answered on 24 Jun 2011
1 answer
97 views
I have radcombox with load on demand=true and allow custom text=false and markfirstmatch=true. we are loading the items from client side with onclientitemsrequested event. when the text entered is not matching the items from list it is not selecting the closest match.

Please suggest me what else settings i need to use to select the closest matched item.


Thanks and Regards
D Praveen
Helen
Telerik team
 answered on 24 Jun 2011
1 answer
140 views
Hi,

How can I used localisation for a fieldEditors like radfilterTextFieldEditor.

Asp :
<telerik:RadFilter ID="RadFilter1" runat="server" Skin="WebBlue">        
        <FieldEditors>                 
            <telerik:RadFilterTextFieldEditor DataType="System.String" DisplayName="Customer account" FieldName="CodeClient" />
         </FieldEditors>
</telerik:RadFilter>

This VB code does'nt work :
Private Sub RadFilter1_FieldEditorCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadFilterFieldEditorCreatedEventArgs) Handles RadFilter1.FieldEditorCreated
        If sculture = "fr-FR" Then
            If e.Editor.FieldName = "CodeClient" Then
                e.Editor.DisplayName = "Code Client"
            End If
        End If
End Sub

Have you got an idea to change the DisplayName in this case ?

Anne
Anne
Top achievements
Rank 1
 answered on 24 Jun 2011
4 answers
200 views
I'm stumped on this performance issue.  When paging a RadGrid I get instantaneous results.  However, when I filter any of the columns, the query takes around 10 seconds to complete and any paging applied after the filter remains just as slow.  If I remove the filter the performance is just fine.

Production is a SharePoint 2010 Server which is hosted in-house with a small number of users.  I am using a RadGrid control, version 2009.3..1314.35 that queries a table containing 30,000 records. I am using LINQ to SQL for the back-end.  I have used IE and Firefox in production.  On my development machine there are no performance issues. 

Below is my code.  Any help would be appreciated.

ASPX:
<telerik:RadGrid ID="rdgrdPeople" DataSourceID="people" PageSize="10" AllowPaging="true" AllowAutomaticDeletes="true" AllowMultiRowSelection="true" Skin="Windows7" OnItemDataBound="rdgrdPeople_ItemDataBound"
  AllowFilteringByColumn="True" AllowSorting="True" AutoGenerateColumns="false" runat="server">
    <GroupingSettings CaseSensitive="False" />
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="Id" OverrideDataSourceControlSorting="true">
        <Columns>
            <telerik:GridHyperLinkColumn Text="View" UniqueName="View" AllowFiltering="false"  DataNavigateUrlFields="Id,Profile"
                            DataNavigateUrlFormatString="managecontact.aspx?id={0}&profile={1}" />
            <telerik:GridHyperLinkColumn Text="Edit" UniqueName="Edit" AllowFiltering="false"  DataNavigateUrlFields="Id,Profile"
                            DataNavigateUrlFormatString="managecontact.aspx?id={0}&profile={1}" />
            <telerik:GridButtonColumn ButtonType="LinkButton" UniqueName="Delete" CommandName="Delete" Text="Delete" ConfirmText="Are you sure you want to delete this person?" />
 
          <telerik:GridTemplateColumn AllowFiltering="false" SortExpression="Marked" HeaderText="Marked" UniqueName="Marked">
 
               <ItemTemplate>
                 <asp:CheckBox
                   ID="chkbxMarked" runat="server"
                   OnCheckedChanged="ToggleRowSelection"
                   Checked='<%# Eval("Marked") %>'
                   AutoPostBack="True" />
               </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="NamePrefix" SortExpression="NamePrefix" AllowFiltering="false" HeaderText="Name Prefix" />
            <telerik:GridBoundColumn DataField="LastName" SortExpression="LastName"  AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Last Name" />
            <telerik:GridBoundColumn DataField="FirstName" SortExpression="FirstName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="First Name" />
            <telerik:GridBoundColumn DataField="MiddleName" SortExpression="MiddleName" AllowFiltering="false" HeaderText="Middle Name" />
            <telerik:GridBoundColumn DataField="Phone1" SortExpression="Phone1" AllowFiltering="false" HeaderText="Phone" />
            <telerik:GridBoundColumn DataField="Phone1Ext" SortExpression="Phone1Ext" AllowFiltering="false" HeaderText="Ext." />
            <telerik:GridBoundColumn DataField="Email1" SortExpression="Email1" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Email" />
            <telerik:GridBoundColumn DataField="Profile" SortExpression="Profile" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Profile" />    
           
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:ObjectDataSource ID="people" runat="server" EnablePaging="true" SelectMethod="FindAllByProfile" DeleteMethod="Delete"
    TypeName="PRA.Business.PersonLogic" StartRowIndexParameterName="rowStart" MaximumRowsParameterName="numRows"
    SelectCountMethod="FindAllByProfileCount" >
    <SelectParameters>
        <asp:ControlParameter ControlID="drplstProfiles" PropertyName="SelectedItem.Value" Name="profileName" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="Id" />
    </DeleteParameters>
</asp:ObjectDataSource>

BLL:
public IList<Person> FindAllByProfile(string profileName, int rowStart, int numRows)
       {
           return profileName == "All" ? _repos.FindAll(rowStart, numRows) : _repos.FindAllByProfile(profileName, rowStart, numRows);
       }
 
       public int FindAllByProfileCount(string profileName)
       {
           return profileName == "All" ? _repos.FindAllCount() : _repos.FindAllByProfileCount(profileName);
       }

Repository:

public IList<Person> FindAll(int rowStart, int numRows)
      {
          using (PRADbDataContext db = new PRADbDataContext())
          {
              var data = from p in db.persons
                         join c in db.contacts on p.PersKey equals c.PersKey into personContacts
                         from pc in personContacts.DefaultIfEmpty()
                         orderby p.Modified descending
                         select new Person()
                                    {
                                        Id = p.PersKey,
                                        AddressId = p.AddrKey,
                                        DateModified = p.Modified,
                                        Email1 = p.EMail1,
                                        Marked = p.Marked,
                                        Phone1 = p.Phone1,
                                        Phone1Ext = p.PhExt1,
                                        NamePrefix = p.MrMs,
                                        FirstName = p.FName,
                                        LastName = p.LName,
                                        MiddleName = p.MName,
                                        Title = p.Title,
                                        Profile = pc.ProfKey ?? "N/A"
                                    };
              return data.Skip(rowStart).Take(numRows).ToList();
          }
      }
 
public int FindAllCount()
      {
          using (PRADbDataContext db = new PRADbDataContext())
              {
                  var data = from p in db.persons
                             join c in db.contacts on p.PersKey equals c.PersKey
                             select new Person()
                             {
                                 Id = p.PersKey,
                             };
                  return data.Count();
              }
      }


Tsvetoslav
Telerik team
 answered on 24 Jun 2011
6 answers
988 views
I've seen numerous other threads in which the update command is not working, but none of them I have found are exactly like my situation. I am programmatically building multiple RadGrids on a single page, each of which is contained in its own RadPanel, and all of the panels are inside a RadAjaxPanel. I am using a custom implementation of the IBindableTemplate for the RadGrid's EditForm. Everything is working fine when I click the delete button (Delete command is fired and the record is deleted).

When I click the "Add New Record" button, the template appears just fine, I can enter information, press the insert button, and the record is inserted and can be seen in the grid. However, when I click on the edit button, the grid goes into edit mode just fine, all values are populated in the template just as they should be and an "Edit" item command is fired.

However, once inside this edit mode, no events fire. If I click on the update button, no update command is fired, and the same is true for the cancel button. I don't understand why the edit mode fails to work but the insert mode works just fine. Any help would be appreciated!
Pavel
Telerik team
 answered on 24 Jun 2011
3 answers
94 views
Hi,

Is there a specific 'CommandName' that will reference the MoveUp.gif and MoveDown.gif graphics/functions for say the Vista skin for RadGrids?

I don't see anything @ http://www.telerik.com/help/aspnet-ajax/grid-command-reference.html

Thanks!
Tsvetina
Telerik team
 answered on 24 Jun 2011
1 answer
166 views
Hi Team,
               We are  using Rad Controls in our application. We are using AJAX Panel in one screen, We are getting one issue on that page which I highlighted in attachment. Please have a look at it and reply as soon as possible.


Detail description of that Issue:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; MS-RTC EA 2)

Timestamp: Wed, 15 Jun 2011 20:12:16 UTC

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near 'tance of an object.|­'.

Line: 6

Char: 62099

Code: 0

URI: http://uat.sengen.com/Sengen/TaxRtnT1/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afab31106-1bd6-4491-9a14-59e0fc4a7081%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.519.20%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7807982c-d856-4b9c-96d9-4b1b757dd848%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a58366029%3aaa288e2d%3ac8618e41%3ae4f8f289%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near 'tance of an object.|­'.

Line: 6

Char: 62099

Code: 0

URI: http://uat.sengen.com/Sengen/TaxRtnT1/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afab31106-1bd6-4491-9a14-59e0fc4a7081%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.519.20%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7807982c-d856-4b9c-96d9-4b1b757dd848%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a58366029%3aaa288e2d%3ac8618e41%3ae4f8f289%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near 'tance of an object.|­'.

Line: 6

Char: 62099

Code: 0

URI: http://uat.sengen.com/Sengen/TaxRtnT1/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afab31106-1bd6-4491-9a14-59e0fc4a7081%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.519.20%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7807982c-d856-4b9c-96d9-4b1b757dd848%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a58366029%3aaa288e2d%3ac8618e41%3ae4f8f289%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4




Please give me a good solution ASAP,
Thanks
Alexis A
Pavlina
Telerik team
 answered on 24 Jun 2011
1 answer
121 views
I'm trying to get a RadRotator to display a set of items, such a news feed, but scrolling appears bugged with the control itself.  For example, lets say I want the RadRotator to have 10 items in a list, and to display 3 items at a time.  It will work for the first cycle (showing items 1,2,3, then items 4,5,6 and then items 7,8,9, then 10.)  The issue start on the next cycle.  It with then show (10, 1, 2, then 3,4,5, etc).  This in and of itself would be fine and I wouldn't consider it a bug, but after a while, it will start only showing the last item in the list.  (so 3, blank space, blank space, then 6, blank space, blank space, etc.)   

Has anyone encountered this before?  Any ideas on what the fix may be?   
Slav
Telerik team
 answered on 24 Jun 2011
1 answer
128 views
When i move more docks, after the 3rd dock i get an error 500.

using
System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data.SqlClient;
using System.Text;
using System.Collections;
using System.Configuration;
 
 
public partial class mods_arrange : System.Web.UI.UserControl
{
    private int _userID = 1;
    private SqlConnection _conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
    private List<DockState> CurrentDockStates
    {
        get
        {
            //Get saved state string from the database - set it to dockState variable for example
            string dockStatesFromDB = "";
            if (Request.Cookies["landingStates_V"] != null)
            {
                dockStatesFromDB = Request.Cookies["landingStates_V"].Value;
            }
            else
            {
                _conn.Open();
                SqlCommand command = new SqlCommand("select State from landing_States where id='" + _userID + "' ", _conn);
                dockStatesFromDB = command.ExecuteScalar().ToString();
                _conn.Close();
            }
            List<DockState> _currentDockStates = new List<DockState>();
            string[] stringStates = dockStatesFromDB.Split('|');
            foreach (string stringState in stringStates)
            {
                if (stringState.Trim() != string.Empty)
                {
                    _currentDockStates.Add(DockState.Deserialize(stringState));
                }
            }
            return _currentDockStates;
        }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        //RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        //manager.ClientEvents.OnRequestStart = "RequestStart";
        //manager.ClientEvents.OnResponseEnd = "ResponseEnd";
 
        if (!IsPostBack)
        {
            DropDownZone.DataBind();
 
        }
    }
 
    public ArrayList GetZones()
    {
        ArrayList zones = new ArrayList();
        zones.Add(RadDockZone1);
        zones.Add(RadDockZone2);
        zones.Add(RadDockZone3);
        return zones;
    }
 
    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);
                //Load the selected widget
                LoadWidget(dock);
 
            }
        }
        loadCheckboxes();
    }
    private void loadCheckboxes()
    {
        ListItem i1 = new ListItem("News", "~/Controls/News.ascx");
        ListItem i2 = new ListItem("Events", "~/Controls/Events.ascx");
        ListItem i3 = new ListItem("Languages", "~/Controls/Languages.ascx");
        ListItem i4 = new ListItem("Market", "~/Controls/MarketIndex.ascx");
        ListItem i5 = new ListItem("VC", "~/Controls/VC.ascx");
        ListItem i6 = new ListItem("DVD", "~/Controls/DVD.ascx");
        ListItem i7 = new ListItem("PIF", "~/Controls/PIF.ascx");
        CheckBoxList1.Items.Add(i1);
        CheckBoxList1.Items.Add(i2);
        CheckBoxList1.Items.Add(i3);
        CheckBoxList1.Items.Add(i4);
        CheckBoxList1.Items.Add(i5);
        CheckBoxList1.Items.Add(i6);
        CheckBoxList1.Items.Add(i6);
 
        LcookieCheck();
    }
 
    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.
        //if (!IsPostBack)
        //{
        //    foreach (DockState state in CurrentDockStates)
        //    {
        //        e.Positions[state.UniqueName] = state.DockZoneID;
        //        e.Indices[state.UniqueName] = state.Index;
        //    }
        //}
        if (!Page.IsPostBack)
        {
            string dockStatesFromCookie = "";
 
            HttpCookie cookieStates = Request.Cookies["dockState"];
 
            if (cookieStates != null)
            {
                dockStatesFromCookie = cookieStates.Value;
                string[] stringStates = dockStatesFromCookie.Split('|');
 
                Hashtable states = new Hashtable();
                for (int i = 0; i < stringStates.Length - 1; i++)
                {
                    string[] currentState = stringStates[i].Split('#');
                    string uniqueName = currentState[0];
                    string state = currentState[1];
                    states.Add(uniqueName, state);
                }
 
                foreach (RadDock dock in RadDockLayout1.RegisteredDocks)
                {
                    string uniqueName = dock.UniqueName;
                    DockState state = DockState.Deserialize(states[uniqueName].ToString());
                    dock.ApplyState(state);
                }
            }
        }
    }
 
    protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)
    {
        List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
        StringBuilder serializedList = new StringBuilder();
        int i = 0;
 
        while (i < stateList.Count)
        {
            serializedList.Append(stateList[i].ToString());
            serializedList.Append("|");
            i++;
        }
 
        string dockState = serializedList.ToString();
        if (dockState.Trim() != String.Empty)
        {
            if (Request.Cookies["landingStates_V"] != null)
            {
                Response.Cookies["landingStates_V"].Value = dockState;
            }
            else
            {
                Response.Cookies["landingStates_V"].Value = dockState;
                Response.Cookies["landingStates_V"].Expires = DateTime.Now.AddDays(5);
            }
            _conn.Open();
            //SqlCommand command = new SqlCommand(String.Format("update landing_States set State='{0}' where id='" + _userID + "'", dockState), _conn);
            //command.ExecuteNonQuery();  //update Dbase
            _conn.Close();
        }
 
    }
 
    private RadDock CreateRadDockFromState(DockState state)
    {
        RadDock dock = new RadDock();
        dock.DockMode = DockMode.Docked;
        dock.ID = string.Format("RadDock{0}", state.UniqueName);
        dock.ApplyState(state);
        //by aresh
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
        dock.DockMode = DockMode.Docked;
        dock.CssClass = "vbox" + state.Title.Replace(' ', 'a');
 
        DockToggleCommand cmd = new DockToggleCommand();
        cmd.OnClientCommand = "OnClientCommand" + state.Title.Replace(' ', 'a');
        cmd.Text = "Edit";
        cmd.CssClass = "rdEdit";
        cmd.AutoPostBack = false;
 
 
        DockCloseCommand cmdclose = new DockCloseCommand();
        cmdclose.AutoPostBack = false;//true;
 
        DockExpandCollapseCommand cmdminmax = new DockExpandCollapseCommand();
        cmdminmax.AutoPostBack = false;
 
 
        dock.Commands.Add(cmdclose);
        dock.Commands.Add(cmdminmax);
        //dock.Commands.Add(cmd);
 
        return dock;
    }
    private RadDock CreateRadDock(String name)
    {
        int docksCount = CurrentDockStates.Count;
 
        RadDock dock = new RadDock();
        dock.DockMode = DockMode.Docked;
        dock.UniqueName = Guid.NewGuid().ToString().Replace(' ', 'a');
        dock.ID = string.Format("RadDock{0}", dock.UniqueName);
        dock.Title = name.Replace('_', ' ');
        dock.Width = Unit.Pixel(300);
        //by aresh
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
        dock.DockMode = DockMode.Docked;
        dock.CssClass = "vbox" + name.Replace(' ', 'a');
 
        DockToggleCommand cmd = new DockToggleCommand();
        cmd.OnClientCommand = "OnClientCommand" + name.Replace(' ', 'a'); ;
        cmd.Text = "Edit";
        cmd.CssClass = "rdEdit";
        cmd.AutoPostBack = false;
 
 
        DockCloseCommand cmdclose = new DockCloseCommand();
        cmdclose.AutoPostBack = false;//true;
 
        DockExpandCollapseCommand cmdminmax = new DockExpandCollapseCommand();
        cmdminmax.AutoPostBack = false;
 
 
        dock.Commands.Add(cmdclose);
        dock.Commands.Add(cmdminmax);
        //dock.Commands.Add(cmd);
 
        return dock;
    }
    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 = false;
 
        AjaxUpdatedControl updatedControl = new AjaxUpdatedControl();
        updatedControl.ControlID = "Panel1";
 
        AjaxSetting setting1 = new AjaxSetting(dock.ID);
        setting1.EventName = "DockPositionChanged";
        setting1.UpdatedControls.Add(updatedControl);
 
        RadAjaxManagerArrange.AjaxSettings.Add(setting1);
    }
    private void LoadWidget(RadDock dock)
    {
        if (string.IsNullOrEmpty(dock.Tag))
        {
            return;
        }
        Control widget = LoadControl(dock.Tag);
        dock.ContentContainer.Controls.Add(widget);
    }
 
 
    protected void ButtonAddDock_Click(object sender, EventArgs e)
    {
        //Load the selected widget in the RadDock control
        foreach (ListItem con in CheckBoxList1.Items)
        {
            if (con.Selected == true)
            {
                WcookieCheck(con.Value, con.Text);
                RadDock dock = CreateRadDock(con.Text);
                //find the target zone and add the new dock there
                RadDockZone dz = (RadDockZone)FindControl(DropDownZone.SelectedItem.Text);
                dz.Controls.Add(dock);
 
                CreateSaveStateTrigger(dock);
 
                dock.Tag = con.Value;
                LoadWidget(dock);
 
                //Register a script to move dock to the last place in the RadDockZone
                //The zone.dock(dock,index) client-side method is used
                ScriptManager.RegisterStartupScript(this,
                    this.GetType(),
                    "MoveDock",
                string.Format(@"function _moveDock() {{
                            Sys.Application.remove_load(_moveDock);
                            $find('{1}').dock($find('{0}'),{2});
                            }};
                            Sys.Application.add_load(_moveDock);", dock.ClientID, DropDownZone.SelectedValue, dz.Docks.Count),
                true);
            }
        }Response.Redirect("/default.aspx");
 
    }
    protected void ButtonPostBack_Click(object sender, EventArgs e)
    {
        if (Request.Cookies["landingChecks_V"] != null)
        {
            HttpCookie myCookie = new HttpCookie("landingChecks_V");
            myCookie.Expires = DateTime.Now.AddDays(-1d);
            Response.Cookies.Add(myCookie);
        }
        Response.Redirect("default.aspx");
    }
 
 
    private void WcookieCheck(string val, string txt)
    {
        HttpCookie cookie = Request.Cookies["landingChecks_V"];
        if (cookie != null)
        {
            cookie.Expires = DateTime.Now.AddYears(-30);
            Response.Cookies.Remove("landingChecks_V");
 
            HttpCookie Newcookie = new HttpCookie("landingChecks_V");
            Newcookie.Expires = DateTime.Now.AddDays(5);
            Newcookie.Values.Add(val, txt);
            Response.Cookies.Add(Newcookie);
 
            cookie.Values.Add(val, txt);
            Response.Cookies.Add(cookie);
        }
        else
        {
            HttpCookie Newcookie = new HttpCookie("landingChecks_V");
            Newcookie.Expires = DateTime.Now.AddDays(5);
            Newcookie.Values.Add(val, txt);
            Response.Cookies.Add(Newcookie);
 
        }
    }
    private void LcookieCheck()
    {
        HttpCookie cookie = Request.Cookies["landingChecks_V"];
        if (cookie != null && cookie.Values != null)
        {
            foreach (string key in cookie.Values.Keys)
            {
                ListItem item = CheckBoxList1.Items.FindByValue(key);
                if (item != null)
                {
                    item.Selected = true;
                }
            }
        }
        else
        {
            CheckBoxList1.Items[0].Selected = true;
            CheckBoxList1.Items[1].Selected = true;
            CheckBoxList1.Items[2].Selected = true;
            CheckBoxList1.Items[3].Selected = true;
            CheckBoxList1.Items[4].Selected = true;
            CheckBoxList1.Items[5].Selected = true;
            CheckBoxList1.Items[6].Selected = true;
        }
 
    }
}

how do i load the docks from the cookie state using the checkboxes?

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="arrange.ascx.cs" Inherits="mods_arrange" %>
 
<div class="content-in">
     
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
        <script type="text/javascript">
            var currentLoadingPanel = null;
            var currentUpdatedControl = null;
            function RequestStart(sender, args) {
                currentLoadingPanel = $find("<%= LoadingPanel1.ClientID %>");
                currentUpdatedControl = "TableLayout";
                currentLoadingPanel.show(currentUpdatedControl);
            }
            function ResponseEnd() {
                //hide the loading panel and clean up the global variables
                if (currentLoadingPanel != null)
                    currentLoadingPanel.hide(currentUpdatedControl);
                currentUpdatedControl = null;
                currentLoadingPanel = null;
            }
        </script>
 
    </telerik:RadCodeBlock>
     
 
    <br />
    <asp:Panel ID="Panel1" runat="server">
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1"  OnSaveDockLayout="RadDockLayout1_SaveDockLayout"
            OnLoadDockLayout="RadDockLayout1_LoadDockLayout" EnableEmbeddedSkins="false" Skin="myx" EnableViewState="false">
            <table id="TableLayout" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
            <div class="left">
                        <telerik:RadDockZone runat="server" ID="RadDockZone1"  >
                        </telerik:RadDockZone>
            </div>
            <div class="center">
                        <telerik:RadDockZone runat="server" ID="RadDockZone2"  >
                        </telerik:RadDockZone>
            </div>
            <div class="right">
                        <telerik:RadDockZone runat="server" ID="RadDockZone3" >
                        </telerik:RadDockZone>
            </div>
                    </td>
                </tr>
            </table>
        </telerik:RadDockLayout>
    </asp:Panel>
 
<asp:Panel ID="Panel2" runat="server" CssClass="customizePanel">
    <a name="customizepage"></a>
    <div class="movable">
    <div class="draggable"><h2>Customize</h2></div>
    <div class="block">
 
 
 
    <div>
        <p>
        <%= vboxTitles.getTitle("Add and remove your preferred topics", Request.QueryString["language"])%>
</p>
<asp:CheckBoxList ID="CheckBoxList1" runat="server"  Enabled="false"
RepeatLayout="UnorderedList">
</asp:CheckBoxList>
                          
<asp:DropDownList ID="DropDownZone" runat="server" DataSource="<%#GetZones() %>"
DataTextField="ID" DataValueField="ClientID" Width="150" Visible="false" >
</asp:DropDownList>
<br />
<br />
<telerik:RadButton ID="ButtonAddDock" runat="server"  OnClick="ButtonAddDock_Click"
                    Text="Save">
                        <Icon PrimaryIconCssClass="rbOk" PrimaryIconLeft="4" PrimaryIconTop="4" />
                </telerik:RadButton>
<asp:Button runat="server" CssClass="button" ID="ButtonPostBack" Text="Reset"
OnClick="ButtonPostBack_Click" />
    <div class="clear"></div>
    </div>
 
 
    </div>
    <div class="block-bottoml">
    <div class="block-bottomr"></div>
    </div>
    </div>
</asp:Panel>
                 
                         
        <br />
    </div>   
 
<telerik:RadAjaxManager  ID="RadAjaxManagerArrange" runat="server" ClientEvents-OnRequestStart="RequestStart"
        ClientEvents-OnResponseEnd="ResponseEnd">
<AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ButtonAddDocks" EventName="Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
</telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="500"
        Skin="Default">
    </telerik:RadAjaxLoadingPanel>
 
please help with sample project on how to get this working

thank you
Slav
Telerik team
 answered on 24 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?