Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
116 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
1 answer
91 views
On the day view, is there a sample showing multiple users with each user getting their own column?  So if there are four people with appointments on that day, each person would be in their own column.

I thought I remember seeing that, but can't find it now.
Thanks,
Adam


edit:
Ok, I found it on the Resource Grouping.

I'm using the DbSchedulerProviderBase to deliver the Appointment objects to the scheduler.  Can I group by fields in the Appointment class? or do I have to add a resource, then group by that?

Basically I just want to group by Appointment.Owner.  Can I do that, or do I have to add a "owner" resource then group by that?
Thanks,
Adam
Kate
Telerik team
 answered on 19 Aug 2013
8 answers
222 views
Hi,
I have one rad grid with 20 more columns, While i frozen the first two columns the last column will be in out of the grid..
and i used to show full columns in grid with "UseStaticHeaders=True", Bcoz am getting different count of columns from DB when i show a grid.

Can you anyone help me..?

Thanks
-Rk.Moorthy
 answered on 19 Aug 2013
0 answers
51 views

Dear Support Team:

  • We are using software application developed by our consultant on ASP.Net, MySQL, Telerik tools.
  • We are facing issues while opening some of the reports (more than 200 pages) on Ctrl-S LIVE Server.
  • The LIVE Server is with CtrlS datacenters at Hyderabad.
  • The same reports are opening on Developers Test Server and our In-house Test Server, where the configurations of these Test Servers are LOW compared to Ctrl-S LIVE Server.

We had discussed the issue with our Developer team and the CtrlS Datacenters team. The issue is still not yet resolved from past 8 months.

Please find the Server Configurations below:

Test Server Configuration:  (located with our Developer)

Processor                       --    AMD X2 Processor Dual core

Memory (RAM)             --    2.00 GB

Operating System          --    Windows Server 2008 Standard R2 64 Bit

LIVE Server Configuration:  (at  Ctrl-S Datacenter)

Processor                       --    Intel(R) Xeon(R) CPU @ 2.80 or Higher

Memory (RAM)             --    6.00 GB

Operating System          --    Windows Server 2008 Standard 32 Bit SP2

Please share your comments which help us in fixing the problem.  

Thanks,

L. Nagaraj

Nagaraj
Top achievements
Rank 1
 asked on 19 Aug 2013
2 answers
121 views
I am considering purchasing the ASP.NET AJAX suite of controls, but first wanted to be sure I could duplicate the following (link listed below) panel behavior. I am currently using jQuery, jQueryUI and plugins and the maintenance has become burdensome. Can I put space between Telerik PanelBar panels like I'm doing on my web site now?

http://moffat.infoenvoy.com/

 
John
Top achievements
Rank 1
 answered on 19 Aug 2013
1 answer
135 views
I have a page from which a radwindow is opened. From this radwindow(win1), on click of a button another radwindow(win2) is opened which will have a radgrid which is populated from the database. Now, in this grid, I want to click a select link which will pass one of the column values to the radwindow that opened it(win1) and then close the second window(win2).  How do I go about with it?

This is how I open the first window:

 

   <div class="filterDiv">

                <telerik:RadButton ID="uxShowAdvancedSearch" runat="server" Text="Advanced Search" Skin="Sunset">

                   <Icon PrimaryIconCssClass="rbSearch" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>

                </telerik:RadButton>

                 <telerik:RadWindow runat="server" Animation="Resize" Behaviors="Close,Move" ClientIDMode="Inherit" ID="uxSearchPopup" RestrictionZoneID="ContentTemplateZone"

                    Modal="true" CenterIfModal="true" Title="Advanced Search" Width="600px" Left="100" Top="100">

                    <ContentTemplate>

                        <sc:AdvancedSearch runat="server" id="uxAdvancedSearch" />

                        <div>

                            <telerik:RadButton ID="uxSearch" Text="Search"  Skin="Sunset" runat="server" OnClick="uxSearch_Click"></telerik:RadButton>

                        </div>

                    </ContentTemplate>

                </telerik:RadWindow>

            <%---Javascript related to the RadWindow above---%>

               <div id="ContentTemplateZone">

                     <telerik:RadScriptBlock runat="server" ID="RadScriptBlockAdvancedSearchPopup">

                        <script type="text/javascript">

                            function openWinContentTemplate()

                            {

                                $find("<%=uxSearchPopup.ClientID %>").show();

                            }

                        </script>

                    </telerik:RadScriptBlock>

                </div>

            </div>

 

The user control AdvancedSearch has a panel to which other usercontrols of type SearchCriteria will be added dynamically. One of the SearchCriteria items will open up another radwindow on click of a button with this markup:

 

                        <asp:Panel ID="uxSponsorsPanel" runat="server" Visible="false">

                            <table>

                                <tr>

                                    <td><asp:TextBox ID = "uxSponsor" runat="server" Text="" /></td>

                                    <td>

                                        <telerik:RadButton ID="uxShowSponsorSearch" runat="server" Text="" Skin="Sunset">

                                           <Icon PrimaryIconCssClass="rbSearch"></Icon>

                                        </telerik:RadButton>

                                    </td>

                                </tr>

                            </table>

                        </asp:Panel>

                        <telerik:RadWindow runat="server" Animation="Resize" Behaviors="Close,Move" ClientIDMode="Inherit" ID="uxSponsorSearchPopup" RestrictionZoneID="ContentTemplateZone"

                        Modal="true" CenterIfModal="true" Title="Sponsor Search" Width="600px" Left="100" Top="100">

                            <ContentTemplate>

                                <sc:SponsorSearch runat="server" id="uxSponsorSearch" />

                                <div>

                                    <telerik:RadButton ID="uxSearch" Text="Search"  Skin="Sunset" runat="server"></telerik:RadButton>

                                </div>

                            </ContentTemplate>

                        </telerik:RadWindow>

                        <%---Javascript related to the RadWindow above---%>

                        <div id="ContentTemplateZone">

                                <telerik:RadScriptBlock runat="server" ID="RadScriptBlockAdvancedSearchPopup">

                                <script type="text/javascript">

                                    function openWinContentTemplate() {

                                        $find("<%=uxSponsorSearchPopup.ClientID %>").show();

                                    }

                                </script>

                            </telerik:RadScriptBlock>

                        </div>

The SponsorSearch control has this radgrid:

   <telerik:RadGrid runat="server" ID="uxSponsorList" OnNeedDataSource="uxSponsorList_NeedDataSource" AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true" PageSize="10"

                AllowSorting="true" AllowFilteringByColumn="true" OnItemCommand="uxSponsorList_ItemCommand" Skin="Sunset" >

                <MasterTableView IsFilterItemExpanded="false" EnableHeaderContextMenu="false" EnableHeaderContextAggregatesMenu="false" EnableHeaderContextFilterMenu="false" EnableLinqGrouping="false"

                CommandItemDisplay="Top" CommandItemStyle-BorderWidth="0px" CommandItemStyle-BorderStyle="None" DataKeyNames="ID">

                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

                     <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />

               

                    <Columns>

                        <telerik:GridBoundColumn DataField="ID" HeaderText="ID" Visible="false" AllowSorting="false"></telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="SponsorName" HeaderText="Name" AllowSorting="true"></telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="SponsorType" Visible="true" HeaderText="Type" AllowSorting="true"></telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="SponsorAgencyClass" HeaderText="Agency Class" AllowSorting="true"></telerik:GridBoundColumn>

                    </Columns>

                </MasterTableView>

                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

        

            </telerik:RadGrid>

I want to have a select column in this grid which on clicking will pass the sponsor name of the selected row to the SearchCriteria control that called it and then close the window.

                       



 

Eyup
Telerik team
 answered on 19 Aug 2013
1 answer
102 views
I'm dynamically building a grid's columns on page load based on a metadata structure I have in the database. The grid is building properly including a variety of column types. For the DropDown column, I'm dynamically adding an additional datasource to the form and setting it's select command as well.

protected void Page_Load(object sender, EventArgs e)
{
    var tableName = Request.QueryString["table"];
    if (tableName != null)
    {
        if (!Page.IsPostBack)
        {
            {
                LayoutGrid(tableName);
            }
        }
        BindData(tableName);
    }
}

private static GridColumn AppendDropDownColumn(MetaColumn columnInfo, RadGrid target)
{
    var relatedColumn = columnInfo.LeftRelatedColumn.FirstOrDefault();
    if (relatedColumn == null)
        // Can't find relationship. Just bind as a text column.
        return AppendTextColumn(columnInfo, target);
 
    var col = new GridDropDownColumn();
    target.Columns.Add(col);
    col.ListTextField = relatedColumn.RightDisplayColumn.DatabaseColumnName;
    col.ListValueField = relatedColumn.RightValueColumn.DatabaseColumnName;
    col.DataField = columnInfo.DatabaseColumnName;
    col.HeaderText = columnInfo.Alias;
 
    // Dynamically add datasource for the item list. RAD Controls don't allow setting the datasource directly
    var itemsSource = new SqlDataSource();
    itemsSource.ConnectionString = ConfigurationManager.ConnectionStrings["DynamicWebDb"].ConnectionString;
    itemsSource.SelectCommand = String.Format("Select {0}, {1} FROM {2} ORDER BY {0}",
        col.ListTextField, col.ListValueField, relatedColumn.RightDisplayColumn.MetaEntity.EntityName);
    itemsSource.ID = "Lookup" + columnInfo.ColumnId;
    target.Parent.Controls.Add(itemsSource);
    col.DataSourceID = itemsSource.ID;
 
    return col;
}

This appears to be binding properly as the display value is being displayed rather than the code in view mode,
 but if I shift to edit mode, the dropdown column looses it's data source values. What do I need to do differently
to re-display the dropdown list values correctly when editing. I would prefer not to have to reconfigure the
datasources on each postback.
Eyup
Telerik team
 answered on 19 Aug 2013
5 answers
360 views
Hi,
I have a grid having multiple records so i used paging now what i wanted is when i check first page records and go in any page and return on first the checked records userid must be maintained and on single button(outside grid) click those records data goes in database.
Thanks.
Eyup
Telerik team
 answered on 19 Aug 2013
1 answer
106 views

I am attempting to implement a custom skin with the RadCalendar control but I cannot seem to get it to display correctly.  I would like to customize the ‘Silk” skin for the calendar but I have run into a few hurdles before I can continue any further.  Once the custom skin is implemented (EnableEmbeddedSkins="False" Skin="Silk") the Calendar has some corrupted display issues.  The navigation buttons do not display correctly and the Days of Week align to the right as opposed to being centered.  Interestingly the calendar works fine with embedded default skin.  It does this in both Firefox and IE10.  Has anyone else run into this issue and if so were you able to rectify the situation?  I have modified several controls – Menu, TabStrip, ToolBar, and Grid without any problems.

Additional:

System: Windows 8.0 64

Visual Studios 2012

IIS 8.0

Web App is built in HTML5 .Net 4.0 (Default Classic in VS 2012)

RadControls for ASP.NET AJAX Q2 2013 2.7

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WhoCalendar.aspx.cs" Inherits="En4cer.eSysAdmin.Users.WhoCalendar" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head id="Head1" runat="server">
    <title>Calendar</title>
    <link href="../../Skins/Calendar/Blue/Calendar.Silk.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>  
        <div>
            <telerik:RadCalendar ID="RadCalendar1" runat="server" EnableEmbeddedSkins="false" Skin="Silk" MultiViewColumns="2"></telerik:RadCalendar>
        </div>
    </form>
</body>
</html>

The CSS file is the Calendar.Silk.css from RadControls for ASP.NET AJAX Q2 2013 unmodified.  Attached is a jpg image of the control.
Venelin
Telerik team
 answered on 19 Aug 2013
1 answer
76 views
Hi,

I just added RadScriptManager control and <a href="#maincontent"> Skip to Navigation</a> attribute to the master.site that will apply to all pages and then I just added <a name="maincontent id="maincontent"> </a> in the content page. 

Once I tested them in I.E 9 browser only, I was getting a common error from the radscriptmanager regarding WebResource.axd, etc.  I removed <a name="maincontent id="maincontent"> </a> off from the content page. It worked now.  I also tested them in other browsers (IE 7, 8, 10, Chrome, and Firefox). They are working 

I cannot figure out why I.E 9 is different from other browsers.

Please resolve this issue.

Thanks,
Chi Ming 


Venelin
Telerik team
 answered on 19 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?