Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
I have a combo-box which provides a list of objects. When the user selects the item in the combo-box, it is bound to an ObjectDataSource. That ObjectDataSource is bound to a RadGrid which auto-populates the grid. This works great.

In this scenario, how do we get the first row of that grid to be selected whenever the user picks a new value in the combo-box? We have tried the grid's pre-render event and the ObjectDataSource's selected event. None of these work as the data has not yet been populated into the grid. 

We also tried the grid's ItemBound event; however, it fires with every event on the grid it seems. We only need it to set the first row when new data has been bound.

Any suggestions on which event to use?

Princy
Top achievements
Rank 2
 answered on 25 Mar 2011
1 answer
270 views
All,

I am having an issue displaying data in my grid using Telerik AJAX controls v. 2010.3.1317.35. I have no idea why, as numerous other grids in other user controls on the same page are displaying fine. I can see in my NeedDataSource event that the oARAC collection object has data, and that the column name in the query is correct in the grid column. I can also see the grid shows 2 empty rows, so for some reason the grid is interpreting the data "4999220" as  

I have confirmed that the NeedDataSource event is not firing twice when loaded, and I am not getting any exceptions.

Below is the code, and attached are the images of what is going on as I debug.

Any and all help is greatly appreciated!

Thanks,
Bruce
       
protected void rgApplications_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    LaundryLogicDAL.ARApplicationsCollection oARAC = new LaundryLogicDAL.ARApplicationsCollection();
 
    LaundryLogicDAL.ARApplicationsQuery oARAQ = new LaundryLogicDAL.ARApplicationsQuery("ara");
    LaundryLogicDAL.ARCreditsQuery oARCQ = new LaundryLogicDAL.ARCreditsQuery("arc");
    LaundryLogicDAL.ARDebitsQuery oARDQ = new LaundryLogicDAL.ARDebitsQuery("ard");
 
    try
    {
        oARAC.es.Connection.Name = "NAS";
        oARAC.es.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
        oARAQ.es2.Connection.Name = "NAS";
        oARAQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
        oARCQ.es2.Connection.Name = "NAS";
        oARCQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
        oARDQ.es2.Connection.Name = "NAS";
        oARDQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
 
        oARAQ.Select(
            oARCQ.CreditIdentifier,
            oARCQ.CreditDate,
            oARCQ.OriginalAmount.As("CreditAmount"),
            oARAQ.ApplicationDate,
            oARAQ.Amount.As("ApplicationAmount"),
            oARAQ.Notes.As("ApplicationNotes"),
            oARDQ.DebitIdentifier,
            oARDQ.DebitDate,
            oARDQ.OriginalAmount.As("DebitAmount")
            );
        oARAQ.InnerJoin(oARCQ).On(
            oARAQ.CreditID == oARCQ.Id);
        oARAQ.InnerJoin(oARDQ).On(
            oARAQ.DebitID == oARDQ.Id);
 
        //if (Session["DebitID"] != null)
        if (ViewState["DebitID"] != null && (int)ViewState["DebitID"] >= 0)
        {
            oARAQ.Where(
                //oARAC.Query.DebitID == (int)Session["DebitID"]
                oARAQ.DebitID == (int)ViewState["DebitID"]
                );
        }
        else if (ViewState["CreditID"] != null && (int)ViewState["CreditID"] >= 0)
        {
            oARAQ.Where(
                //oARAC.Query.DebitID == (int)Session["DebitID"]
                oARAQ.DebitID == (int)ViewState["CreditID"]
                );
        }
 
        if (oARAC.Load(oARAQ))      
        {
            rgApplications.DataSource = oARAC;
        }
        else
        {
            rgApplications.DataSource = new object[0];
        }
    }
    catch(Exception ex)
    {
        rgApplications.DataSource = new object[0];
        DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, ex);
    }
    finally
    {
        oARAC.Dispose();
        oARAC = null;
        oARAQ = null;
        oARCQ = null;
        oARDQ = null;
    }
}

<telerik:RadGrid ID="rgApplications" runat="server" AllowFilteringByColumn="True"
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
    OnNeedDataSource="rgApplications_NeedDataSource">
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
    <MasterTableView AllowMultiColumnSorting="True">
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="CreditIdentifier" FilterControlAltText="Filter CreditIdentifier column"
                HeaderText="Credit ID" UniqueName="CreditIdentifier">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>
Bruce
Top achievements
Rank 1
 answered on 25 Mar 2011
3 answers
157 views

Hi,

It seems that Korean Culture of RadDateTimePicker of Q2 version has something wrong which although I select time with PM but it is always selected only AM.
(but, it works with en-US culture)

please, refer to below details and let me know.

Many thanks,
Joey

<telerik:RadDateTimePicker ID="rdpReservationDate" runat="server" MinDate="2006/1/1" ToolTip="Please Select datetime.." Culture="Korean (Korea)" Width="170px">  
                        <DateInput runat="server" ID="DateInput">  
                        </DateInput>  
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>  
 
<TimeView CellSpacing="-1" Culture="Korean (Korea)"></TimeView>  
 
<TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>  
 
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>  
                    </telerik:RadDateTimePicker> 

 

Daniel
Telerik team
 answered on 24 Mar 2011
2 answers
71 views
hey ,
'M new in radcontrols .. and i have a problem with radgrid ..
the prob's when i select a row from grid ,, i cant access the selected row in my cs code ..
wat i was writing when i was using GridView is :
GridView1.SelectedRow.cells[1].text;
can anyone tell me how i can do that with radGrid ?!!
myceno
Top achievements
Rank 1
 answered on 24 Mar 2011
12 answers
351 views
Hi,
I am using RadGrid with RadFilter. Everything works fine, after I select some data to filter and apply the filter if I close the browser after that I get the "Microsoft JScript runtime error: '_events' is null or not an object" error somewhere in Telerix.web.ui

aspx file:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default14.aspx.cs" Inherits="Default14" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
  
    <script type="text/javascript">
        //
        function openFilterBuilderDialog() {
            $find('<%=RadWindow1.ClientID %>').show();
        }
  
        function hideFilterBuilderDialog() {
            $find('<%=RadWindow1.ClientID %>').close();
        }
  
        function OnHeaderMenuItemClicked(sender, args)
        {
            if (args.get_item().get_value() == "FilterBuilder")
            {
                openFilterBuilderDialog();
            }
        }
  
        function onPanelBarItemClicked(sender, args)
        {
            if (args.get_item().get_commandName() == "OpenRadFilter")
            {
                openFilterBuilderDialog();
            }
        }
    </script>
  
</telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
      
    <asp:Button ID="Button1" runat="server" Text="Refresh" OnClick="Button1_Click" />
      
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadFilter1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadFilter1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="ApplyButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
        <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Move,Close,Resize" Title="Filter Builder"
            Modal="true" Width="500" Height="350">
            <ContentTemplate>
                <telerik:RadFilter runat="server" ID="RadFilter1" FilterContainerID="RadGrid1" ShowApplyButton="false" style="margin:10px 0 0 10px"/>
                <asp:Panel ID="FilterButtonPanel" runat="server" style="margin:10px 0 0 10px;font-size:medium">
                    <asp:LinkButton runat="server" ID="ApplyButton" OnClick="ApplyButton_Click" Font-Names="Verdana" Font-Size="Small"
                    Text="Apply Expressions" OnClientClick="hideFilterBuilderDialog()"/>
                </asp:Panel>
            </ContentTemplate>
        </telerik:RadWindow>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="5" 
        AllowSorting="true" OnItemCommand="RadGrid1_ItemCommand" 
        AllowFilteringByColumn="True">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="ID" IsFilterItemExpanded ="false" CommandItemDisplay="Top">
            <CommandItemTemplate>
                    <telerik:RadToolBar runat="server" ID="RadToolBar1" OnClientButtonClicked="onPanelBarItemClicked">
                        <Items>
                            <telerik:RadToolBarButton Text="Show filter" CommandName="OpenRadFilter" ImageUrl="<%#GetFilterIcon() %>"
                                ImagePosition="Right"/>
                        </Items>
                    </telerik:RadToolBar>
                </CommandItemTemplate>
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <PagerStyle Mode="NumericPages" />
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" ReadOnly="true" HeaderButtonType="None">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description">
                </telerik:GridBoundColumn>                
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>    
      
    </form>
</body>
</html>

cs code:
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;
using System.Collections;
  
public partial class Default14 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.DataSource = Data ;
        RadGrid1.DataBind();
    }
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.PageCommandName)
        {
            e.Item.OwnerTableView.CurrentPageIndex = (e as GridPageChangedEventArgs).NewPageIndex;
            RadGrid1.DataSource = Data;
            RadGrid1.DataBind();
        }
        if (e.CommandName == RadGrid.SortCommandName)
        {
            RadGrid1.DataSource = Data ;
            RadGrid1.DataBind();
        }
    }
    public DataTable Data
    {
        get
        {
            if (Session["Data"] == null)
            {
                DataTable table = new DataTable();
                table.Columns.Add("ID");
                table.Columns.Add("Description");
                for (int i = 0; i < 10; i++)
                {
                    table.Rows.Add(i, "Description" + i.ToString());
                }
                Session["Data"] = table;
            }
            return (DataTable)Session["Data"];
        }
        set
        {
            Session["Data"] = value;
        }
    }
    protected string GetFilterIcon()
    {
        //RadGrid1.Skin = RadSkinManager1.Skin ;
        //RadGrid1.Rebind();
  
        return RadAjaxLoadingPanel.GetWebResourceUrl(Page, string.Format("Telerik.Web.UI.Skins.{0}.Grid.Filter.gif", "Vista"));
    }
    protected void ApplyButton_Click(object sender, EventArgs e)
    {
        RadFilter1.FireApplyCommand();
        RadGrid1.DataSource = Data ;
        RadGrid1.Rebind();
    }
}

Please advise what is wrong here.

Thanks,
Reena
Rick Borage
Top achievements
Rank 1
 answered on 24 Mar 2011
3 answers
91 views
Hello
after following the manual upgrade procedure (replacing telerik.web.ui and telerik.web.design from bin40 folder) build fails.
Error message is:
Could not load file or assembly 'file:/// (..path..)\telerik.web.ui or one fo its dependencies, Operation is not supported (Exception from HRESULT:0x80131515)
Using VS201. I reviewed the manual installation KB article but it did not help.
Thanks


Rodrigo Castro
Top achievements
Rank 1
 answered on 24 Mar 2011
1 answer
47 views
I am trying to generate a bar graph.
A snippet of my code is this:
strPending = Convert.ToDouble(dataView.Table.Rows[0]["Pending"]);
                   strProposed = Convert.ToDouble(dataView.Table.Rows[0]["Proposed"]);
                   strSold = Convert.ToDouble(dataView.Table.Rows[0]["Sold"]);
                   strPerformed = Convert.ToDouble(dataView.Table.Rows[0]["Performed"]);
                   strTotal = Convert.ToDouble(dataView.Table.Rows[0]["TotalLeads"]);
                   //RadChart radChart = new RadChart();
                   RadChartLeads.ChartTitle.TextBlock.Text = "Sales Statistics";
                   // Create a ChartSeries and assign its name and chart type
                   ChartSeries chartSeries = new ChartSeries();
                   chartSeries.Name = "Sales";
                   chartSeries.Type = ChartSeriesType.Bar;
                   // add new items to the series,
                   // passing a value and a label string
                   //chartSeries.AddItem(double ValueType,string label, color)
                   chartSeries.AddItem(strPending, "Pending");
                   chartSeries.AddItem(strProposed, "Proposed");
                   chartSeries.AddItem(strSold, "Sold");
                   chartSeries.AddItem(strPerformed, "Performed");
                   chartSeries.AddItem(strTotal, "Total Leads");
                   // add the series to the RadChart Series collection
                   RadChartLeads.Series.Add(chartSeries);
                   // add the RadChart to the page.
                   //this.Page.Controls.Add(RadChartLeads);
                   //RadChart radChart = new RadChart();
                   //radChart.ChartTitle.TextBlock.Text = "Sales Statistics";
                     
                   //ChartSeries chartSeries = new ChartSeries();
                   //chartSeries.Name = "Sales";
                   //chartSeries.Type = ChartSeriesType.Bar;
                    
                   //chartSeries.AddItem(strPending, "Pending");
                   //chartSeries.AddItem(strProposed, "Proposed");
                   //chartSeries.AddItem(strSold, "Sold");
                   //chartSeries.AddItem(strPerformed, "Performed");
                   //chartSeries.AddItem(strTotal, "Total Leads");
                     
                   //radChart.Series.Add(chartSeries);                   
                    
                   //this.pchChart.Controls.Add(radChart);

I have tried 3 things one: I have a radchart on my page called RadChartLeads
and then in the codebehind I create theChartSeries ect.. as you can see in the code above.
I have also tried to programmatically create the chart and add it to a placeholder.
And 3rd, I have taken the code from the Asp.net Ajax Documentation for "Creating RadChart Programmatically" without modifying anything I even used the chartSeries.AddItem(120, "Internet")
chartSeries.AddItem(140, "Retail")
chartSeries.AddItem(35, "Wholesale") lines.  And nothing.

With the first way, when I have a radchart on my page, then the chart shows up but with no data it never got the series.
The other 2 ways, the chart never shows.

Thansk for any help,
KS
Keith Stephens
Top achievements
Rank 1
 answered on 24 Mar 2011
1 answer
188 views
Hi,

There is some particular cases when I would like the reference to Telerik.Web.UI.WebResource.axd to be absolute in the html.  How can I acheive that?

For example, I would like this:

<script src="/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl05_TSM&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3afr-CA%3a3de828f0-5e0d-4c7d-a36b-56a9773c0def%3aea597d4b%3ab25378d2" type="text/javascript"></script>

to instead look likt this:

<script src="http://mydomain.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl05_TSM&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3afr-CA%3a3de828f0-5e0d-4c7d-a36b-56a9773c0def%3aea597d4b%3ab25378d2" type="text/javascript"></script>

Thanks.

P

Simon
Telerik team
 answered on 24 Mar 2011
7 answers
441 views
I have just created a combobox on my page and need to skin it so it fits with my site and have come across an issue that I can't figure out.

When an item is selected in the combobox that has a length greater than that of the control, the text for the selected value over runs slightly and text appears outside of the input area and over the arrow icon on the end. I have attached a blown up screen shot of my control to show what I mean.

Below is the code used to build my control, as well as the stylesheet which I have properly referenced in my page.

Can anyone spot whats causing this and how I'd go about fixing it?

Thanks
Karl

<telerik:RadComboBox 
        id="Test15" 
        runat="server" 
        width="200px" 
        Skin="Probitas" 
        EnableEmbeddedSkins="false"
        EmptyMessage="Select a value...">
    <Items>
        <telerik:RadComboBoxItem Text="One" Value="1" />
        <telerik:RadComboBoxItem Text="Two" Value="2" />
        <telerik:RadComboBoxItem Text="Three" Value="3" />
        <telerik:RadComboBoxItem Text="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" Value="All" />
    </Items>
</telerik:RadComboBox>

and the stylesheet...
/* RadComboBox Simple skin */
  
/*global*/
  
.RadComboBox_Probitas,
.RadComboBox_Probitas .rcbInput,
.RadComboBoxDropDown_Probitas
{
    font: 12px "Segoe UI", Arial, sans-serif;
    color: #333;
}
  
/* combobox */
  
div.RadComboBox_Probitas table td.rcbInputCell
{
    height: 18px;
    line-height: 18px;
    border: 1px solid #10568A;
    background: #fff;
}
      
* html div.RadComboBox_Probitas table td.rcbInputCell
{
    height /**/: 20px;
    line-height /**/: 20px;
}
  
div.RadComboBox_Probitas table td.rcbInputCellLeft { border-width: 1px 0 1px 1px; }
div.RadComboBox_Probitas table td.rcbInputCellRight { border-width: 1px 1px 1px 0; }
  
* html div.RadComboBox_Probitas .rcbInputCell .rcbInput
{
    height /**/: 16px;
    padding /**/: 2px 0; /* This should fix the ajax introduced height in IE7 and not break IE6 */
}
  
.RadComboBox_Probitas .rcbInputCell .rcbEmptyMessage
{
    color: #666;
}
  
.RadComboBox_Probitas .rcbHovered .rcbInputCell .rcbInput,
.RadComboBox_Probitas .rcbFocused .rcbInputCell .rcbInput { color: #333333; }
  
div.RadComboBox_Probitas table td.rcbArrowCell
{
    border: 1px solid #10568A;
    background: #fff url('ComboBox/rcbSprite.png') no-repeat -1px 50%;
}
  
div.RadComboBox_Probitas .rcbReadOnly .rcbArrowCellLeft,
div.RadComboBox_Probitas .rcbArrowCellHidden.rcbArrowCellLeft { border-width: 1px 1px 1px 1px; }
div.RadComboBox_Probitas .rcbReadOnly .rcbArrowCellRight,
div.RadComboBox_Probitas .rcbArrowCellHidden.rcbArrowCellRight { border-width: 1px 1px 1px 1px; }
  
.RadComboBox_Probitas td.rcbArrowCell { background-position: -1px 50%; }
.RadComboBox_Probitas .rcbHovered .rcbArrowCell { background-position: -21px 50%; }
.RadComboBox_Probitas .rcbFocused .rcbArrowCell { background-position: -41px 50%; }
.RadComboBox_Probitas .rcbDisabled .rcbArrowCell { background-position: -61px 50%; }
  
.RadComboBox_Probitas .rcbReadOnly td.rcbArrowCell { background-position: -2px 50%; }
.RadComboBox_Probitas .rcbHovered .rcbReadOnly .rcbArrowCell { background-position: -22px 50%; }
.RadComboBox_Probitas .rcbFocused .rcbReadOnly .rcbArrowCell { background-position: -42px 50%; }
.RadComboBox_Probitas .rcbDisabled .rcbReadOnly .rcbArrowCell { background-position: -62px 50%; }
  
.RadComboBox_Probitas td.rcbArrowCellHidden,
.RadComboBox_Probitas .rcbHovered td.rcbArrowCellHidden,
.RadComboBox_Probitas .rcbFocused td.rcbArrowCellHidden,
.RadComboBox_Probitas .rcbReadOnly td.rcbArrowCellHidden,
.RadComboBox_Probitas .rcbHovered .rcbReadOnly .rcbArrowCellHidden,
.RadComboBox_Probitas .rcbFocused .rcbReadOnly .rcbArrowCellHidden,
.RadComboBox_Probitas .rcbDisabled .rcbReadOnly .rcbArrowCellHidden,
.RadComboBox_Probitas table.rcbDisabled td.rcbArrowCellHidden  
{
    /*background: #none; */
    background: #ffffff; 
}
  
  
.RadComboBox_Probitas .rcbHovered .rcbArrowCell,
.RadComboBox_Probitas .rcbHovered .rcbReadOnly .rcbInputCell,
.RadComboBox_Probitas .rcbHovered .rcbReadOnly .rcbArrowCellHidden { background-color: #ffffff; }
.RadComboBox_Probitas .rcbFocused .rcbArrowCell,
.RadComboBox_Probitas .rcbFocused .rcbReadOnly .rcbInputCell,
.RadComboBox_Probitas .rcbFocused .rcbReadOnly .rcbArrowCellHidden { background-color: #ffffff; }
  
div.RadComboBox_Probitas .rcbHovered .rcbArrowCell,
div.RadComboBox_Probitas .rcbHovered .rcbInputCell { border-color: #10568A; }
div.RadComboBox_Probitas .rcbFocused .rcbArrowCell,
div.RadComboBox_Probitas .rcbFocused .rcbInputCell { border-color: #10568A; }
div.RadComboBox_Probitas .rcbDisabled .rcbArrowCell,
div.RadComboBox_Probitas .rcbDisabled .rcbInputCell { border-color: #10568A; }
  
div.RadComboBox_Probitas .rcbArrowCell a
{
    height: 20px;
}
  
div.RadComboBox_Probitas td.rcbArrowCellHidden,
div.RadComboBox_Probitas .rcbArrowCellHidden a
{
    width: 1px;
}
  
div.RadComboBox_Probitas td.rcbArrowCellHidden.rcbArrowCellRight
{
    border-left: 1px solid #10568A;
}
  
/* Read-only styles */
  
/* dropdown */
  
.RadComboBoxDropDown_Probitas
{
    background: #fff;
    border-color: #10568A;
}
  
.RadComboBoxDropDown_Probitas .rcbHeader,
.RadComboBoxDropDown_Probitas .rcbFooter
{
    background: #e4e4e4;
    color: #000;
}
  
.RadComboBoxDropDown_Probitas .rcbHeader
{
    border-bottom-color: #10568A;
}
  
.RadComboBoxDropDown_Probitas .rcbFooter
{
    border-top-color: #10568A;
}
  
.RadComboBoxDropDown_Probitas .rcbItem em
{
    background: #ffffff;
}
  
div.RadComboBoxDropDown_Probitas .rcbHovered
{
    background: #ffffff;
    color: #ffffff;
    border: 1px solid #10568A;
    padding: 1px 5px;
}
  
.RadComboBoxDropDown_Probitas .rcbSeparator
{
    color: #cc0000;
    background: #0000cc;
  
    /*
    color: #fff;
    background: #8a8a8a;
    */
}
  
.RadComboBox_Probitas .rcbDisabled .rcbInputCell .rcbInput,
.RadComboBoxDropDown_Probitas .rcbDisabled
{
    color: #888888;
}
  
.RadComboBoxDropDown_Probitas .rcbLoading
{
    background: #ffffff;
}
  
.RadComboBoxDropDown_Probitas .rcbMoreResults
{
    border-top-color: #10568A;
    background: #ffffff;
    color: #333333;
}
  
.RadComboBoxDropDown_Probitas .rcbMoreResults a
{
    background: url('ComboBox/rcbSprite.png') no-repeat -1px -85px;
}
  
  
  
  
  
  
  
  
  
div.RadComboBox_Probitas .rcbInputCell 
{
    border-color: #10568A;
}
  
.RadComboBox_Probitas .rcbInput 
{
    color: #000000;
}
  
DIV.RadComboBox_Probitas .rcbArrowCell 
{
    border-color: #10568A;
}
  
div.RadComboBox_Probitas .rcbHovered .rcbInputCell 
{
    border-color: #10568A;
}
  
div.RadComboBox_Probitas .rcbHovered .rcbInput 
{
    color: #000000;
}
  
.RadComboBox_Probitas .rcbHovered .rcbArrowCell 
{
    border-color: #10568A;
    background-color: #FFFFFF;
}
  
div.RadComboBox_Probitas .rcbFocused .rcbInputCell 
{
    border-color: #10568A;
}
  
div.RadComboBox_Probitas .rcbFocused .rcbInput 
{
    color: #000000;
}
  
div.RadComboBox_Probitas .rcbFocused .rcbArrowCell 
{
    background-color: #FFFFFF;
}
  
div.RadComboBox_Probitas .rcbDisabled .rcbInputCell 
{
    border-color: #888888;
}
  
div.RadComboBox_Probitas .rcbDisabled .rcbArrowCell 
{
    border-color: #888888;
}
  
div.RadComboBoxDropDown_Probitas 
{
    border-color: #10568A;
}
  
  
div.RadComboBoxDropDown_Probitas .rcbHeader 
{
    background-color: #BCD1E1; /*light blue*/
}
div.RadComboBoxDropDown_Probitas .rcbHovered 
{
    border: #10568A 1px solid;
    background-color: #BCD1E1;
    color: #000000;
}
  
  
  
  
  
/*General*/
div.RadComboBox_Probitas .rcbInputCell 
{
    border-color: #10568A;
    border-right: #10568A 1px solid;
}
  
  
div.RadComboBox_Probitas .rcbArrowCell 
{
    border-color: #10568A;
}
  
  
/*Hovered*/
div.RadComboBox_Probitas .rcbHovered .rcbInputCell 
{
    border-right: #10568A 1px solid;
}
div.RadComboBox_Probitas .rcbHovered .rcbInput
{
    color: #000000;
}
/*Focused*/
div.RadComboBox_Probitas .rcbFocused .rcbInputCell 
{
    border-right: #10568A 1px solid;
    border-color: #10568A;
}
div.RadComboBox_Probitas .rcbFocused .rcbInput 
{
    color: #000000;
}
/*Disabled*/
div.RadComboBox_Probitas .rcbDisabled .rcbInputCell 
{
    border-right: #888888 1px solid;
    border-color: #888888;
}
div.RadComboBox_Probitas .rcbDisabled .rcbInput 
{
    color: #888888;
}
div.RadComboBox_Probitas .rcbDisabled .rcbArrowCell 
{
    border-color: #888888;
    color: #888888;
}
Kate
Telerik team
 answered on 24 Mar 2011
4 answers
111 views
Hi, 

I currently have a page which has 8 docks spread between two docking zones. These are not dynamic and are coded into the page. My aim is to give the user the ability to save the position of the dock, it's collapse state and whether it viewable or not. everything works in that respect apart from one thing, the Index of the dock. I chose to use javascript (postbacks, update panels and web services were not an option) to save the state of the docks in a cookie when certain client side events fire, I then access this cookie on Page_Init and LoadDockLayout and apply to the relevant dock. when debugging in VS these events are hit and the information in the state is correct i.e. the index of the dock is the index that it should be. I have tried to manually set the index after calling ApplyState(), see below:
For Each dock As RadDock In RadDockLayout1.RegisteredDocks
                  Dim uniqueName As String = dock.UniqueName
                  Dim title As String = dock.Title
                  Dim index As Integer = dock.Index
                  Dim id As String = dock.ID
                  If Not (uniqueName = "") Then
                      Dim state As DockState = DockState.Deserialize(states(uniqueName).ToString())
                      dock.ApplyState(state)
                      Dim iIndex As Integer = state.Index
                      dock.Index = iIndex
                      Dim zone As String = state.DockZoneID
                      dock.DockZoneID = zone
                      dock.UniqueName = uniqueName
                      dock.Title = title
                      dock.EnableAnimation = True
                      dock.Width = Unit.Pixel(250)
                      dock.EnableRoundedCorners = True
                      dock.Style.Value = "margin-bottom: 10px !important;"
                  End If
 
              Next

Unfortunately for some reason the Index of the dock gets over written somewhere along the line and when the page loads the docks are all correct in terms of state apart from the order in which they appear in the dock zone's. For some reason the Index I set in the code behind gets over written with the index that it is on the markup page, below is a cut down example:

<telerik:RadDockZone ID="RadDockZone2" runat="server" Orientation="Vertical" Height="100%" >
      
                     
 
                        <telerik:RadDock ID="RadDock9" UniqueName="RadDock9" runat="server" Title="License Information" Width="250px" DockMode="Docked"
                            EnableAnimation="true" EnableRoundedCorners="true" Resizable="true" OnClientInitialize="DockInit" OnClientDockPositionChanged="OnDockChange" 
                    OnClientCommand="OnClientCommand" Style="margin-bottom: 10px !important;">
                            <ContentTemplate>
                                <uc8:license ID="license1" runat="server" />
                            </ContentTemplate>
                        </telerik:RadDock>
 
 
                        <telerik:RadDock ID="RadDock8" UniqueName="RadDock8" runat="server" Title="Sales Basket" Width="250px" DockMode="Docked"
                            EnableAnimation="true" EnableRoundedCorners="true" OnClientInitialize="DockInit" OnClientDockPositionChanged="OnDockChange"
                    OnClientCommand="OnClientCommand" Resizable="true" Style="margin-bottom: 10px !important;">
                            <ContentTemplate>
                                <uc10:SalesBasket ID="SalesBasket" runat="server" />
                            </ContentTemplate>
                        </telerik:RadDock>
</<telerik:RadDockZone>

In the code above if I were to set the index of RadDock8 to 0 and the index of RadDock9 to 1 it would load with RadDock9 with an index of 0 and Raddock8 with an index of 1. I have been through all the code and as already stated the correct index's are being passed and applied, but they just get over written somewhere and for some reason?

After looking at some other threads I can see that this was a bug in the past (http://www.telerik.com/community/forums/aspnet-ajax/docking/index-of-dockstate-not-persisting.aspx), has this been fixed now? Am I going about it the wrong way or missing something?

Regards

James
Pero
Telerik team
 answered on 24 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?