Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
91 views
Hi,

I have a problem with the RadDatePicker width in IE 7, and you can notice this problem in your demo. Check the attachement
The width does not behave the same in IE7 as oppose to IE8 and above and Firefox

How shoud I handle that ?

I am running the Telerik last version Q1 2013
thanks
J-Francois
Milena
Telerik team
 answered on 17 Jul 2013
31 answers
2.1K+ views
k, I am having a terrible time with making the splitter take up 100% of the height (full page).

I can make it work easily without using master pages.  I simply follow the example that you guys have provided and it works wonderfully.  However, if I take the exact same example and apply it to my web app that is using a master page, I cannot get it to work at all.  Has anyone been able to have the splitter take up the full page using a master pages?  If so, can I see an example of how it was done?

Thanks,
Tad
Steve
Top achievements
Rank 1
 answered on 17 Jul 2013
11 answers
272 views
I have some NumericTextBox in a EditTemplate of a RadGrid. There is a strange behaviour with my NumericTextBox... When I mouse over the TextBox, the width lengthens for about 5-10 pixels.

What is the cause ?
Milena
Telerik team
 answered on 17 Jul 2013
5 answers
149 views
Adding anchor control to the titlebarcontainer of the dock does not display expand/collapse and close buttons in IE9 & IE10. It works perfectly in Firefox and Chrome.

I am attaching all the code and the screenshots related to this issue. Please let me know what I am missing. It was working fine with the trial version.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Dashboard1.ascx.cs" Inherits="Desktop_Controls_Dashboard1" %><br><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><br><%@ Reference VirtualPath="~/Desktop/Controls/Widgets/MonthlyMachineChart.ascx" %><br><br><telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Metro" <br>     OnSaveDockLayout="RadDockLayout1_SaveDockLayout" ><br>    <table><br>        <tr><br>            <%--<td style="width:20px">&nbsp;&nbsp;</td>--%><br>            <td style="vertical-align: top">                <br>                <telerik:RadDockZone ID="RadDockZone0" runat="server" Orientation="Vertical" Width="420px" <br>                    MinHeight="400px" Style="float: left; margin-right: 20px;"><br>                    <br>                </telerik:RadDockZone><br>            </td><br>            <td style="vertical-align: top"><br>                <telerik:RadDockZone ID="RadDockZone1" runat="server" Orientation="Vertical" Width="420px"<br>                    MinHeight="400px" Style="float: left; margin-right: 20px;"><br>                    <br>                </telerik:RadDockZone><br>            </td><br>            <td style="vertical-align: top"><br>                <telerik:RadDockZone ID="RadDockZone2" runat="server" Orientation="Vertical" Width="420px"<br>                    MinHeight="400px"><br>                    <br>                </telerik:RadDockZone><br>            </td><br>        </tr><br>    </table><br></telerik:RadDockLayout>


using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Web;<br>using System.Web.UI;<br>using System.Web.UI.WebControls;<br>using System.Web.UI.HtmlControls;<br>using AzimaDLI;<br>using AzimaDLI.Users;<br>using Telerik.Web.UI;<br>using System.Text;<br><br>public partial class Desktop_Controls_Dashboard1 : BaseControl<br>{<br>    public int selectedPlantId = 0;<br>    private string connString = string.Empty;<br>    User thisUser = null;<br><br>    //Store the info about the added docks in the session.<br>    private List<DockState> CurrentDockStates<br>    {<br>        get<br>        {<br>            List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStates"];<br>            if (Object.Equals(_currentDockStates, null))<br>            {<br>                _currentDockStates = new List<DockState>();<br>                Session["CurrentDockStates"] = _currentDockStates;<br>            }<br>            return _currentDockStates;<br>        }<br>        set<br>        {<br>            Session["CurrentDockStates"] = value;<br>        }<br>    }<br><br>    protected void Page_Init(object sender, EventArgs e)<br>    {     <br>        if (Session != null)<br>        {<br>            connString = Session["ConnString"].ToString();<br>            thisUser = ((User)Session["User"]);<br>            selectedPlantId = Convert.ToInt32(Session["SelectedPlantId"]);<br>        }<br><br>        LoadWidgets();<br>        //if (Page.IsPostBack)<br>        //{<br>        //    //UpdateLayoutState();<br>        //    //Recreate the docks in order to ensure their proper operation<br>        //    for (int i = 0; i < CurrentDockStates.Count; i++)<br>        //    {<br><br>        //        RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);<br>        //        //We will just add the RadDock control to the RadDockLayout.<br>        //        // You could use any other control for that purpose, just ensure<br>        //        // that it is inside the RadDockLayout control.<br>        //        // The RadDockLayout control will automatically move the RadDock<br>        //        // controls to their corresponding zone in the LoadDockLayout<br>        //        // event (see below).<br>        //        RadDockLayout1.Controls.Add(dock);<br>        //        //We want to save the dock state every time a dock is moved.<br>        //        CreateSaveStateTrigger(dock);<br>        //        //Load the selected widget<br>        //        if (string.IsNullOrEmpty(dock.Tag) || dock.Closed)<br>        //        {<br>        //            return;<br>        //        }<br>        //        Control widget = LoadControl(dock.Tag);<br>        //        dock.ContentContainer.Controls.Add(widget);<br><br>        //        if (CurrentDockStates[i].Closed == true)<br>        //        {<br>        //            dock.Visible = false;<br>        //        }<br>        //    }<br>        //}<br>        //else<br>        //{<br>        //    LoadWidgets();<br>        //}<br>    }<br><br>    protected void Page_Load(object sender, EventArgs e)<br>    {<br>        <br>    }<br><br>    private void LoadWidgets()<br>    {<br>        //get the list of widgets that the user has<br>        List<WidgetUser> widgetList = WidgetUser.GetWidgetsByPortalUserId(thisUser.PortalUserId, connString);<br>        string title = string.Empty;<br>        string tag = string.Empty;<br>        string onclick = string.Empty;<br>        string href = string.Empty;<br>        HtmlAnchor anchor = new HtmlAnchor();<br>        <br>        //loop through the widgetList<br>        foreach (WidgetUser item in widgetList)<br>        {<br>            switch (item.WidgetId)<br>            {<br>                // customer widget<br>                case 1:<br>                    tag = "~/Desktop/Controls/Widgets/CustomerInfo.ascx";<br>                    title = Session["CID"].ToString();<br>                    CreateWidget(item, tag, title, null);                    <br>                    break;<br>                case 2:<br>                    tag = "~/Desktop/Controls/Widgets/WatchList.ascx";<br>                    anchor = GetAnchor("plus", "goToWatchList();", item.WidgetName, "javascript:void(0)");<br>                    CreateWidget(item, tag, "", anchor);<br>                    break;<br>                case 3:<br>                    tag = "~/Desktop/Controls/Widgets/ManualCollection.ascx";<br>                    href = string.Format("~/Desktop/Reports/MachinesBySeverity.aspx?PlantId={0}&AreaId=0&MachType=manual", selectedPlantId);<br>                    anchor = GetAnchor("collect", onclick, item.WidgetName, href);<br>                    CreateWidget(item, tag, "", anchor);<br>                    break;<br>                case 4:<br>                    tag = "~/Desktop/Controls/Widgets/OnlineCollection.ascx";<br>                    href = string.Format("~/Desktop/Reports/MachinesBySeverity.aspx?PlantId={0}&AreaId=0&MachType=online", selectedPlantId);<br>                    anchor = GetAnchor("collect", onclick, item.WidgetName, href);<br>                    CreateWidget(item, tag, "", anchor);<br>                    break;<br>                case 5:<br>                    tag = "~/Desktop/Controls/Widgets/DataCollection.ascx";<br>                    href = string.Format("~/Desktop/Reports/OverdueMachines.aspx?PlantId={0}&AreaId=0", selectedPlantId);<br>                    anchor = GetAnchor("collect", onclick, item.WidgetName, href);<br>                    CreateWidget(item, tag, "", anchor);<br>                    break;<br>                case 6:<br>                    tag = "~/Desktop/Controls/Widgets/MonthlyMachineChart.ascx";<br>                    CreateMonthlyMachWidget(item, tag, "", "sevtrend");<br>                    break;<br>                case 7:<br>                    tag = "~/Desktop/Controls/Widgets/MonthlyMachineChart.ascx";<br>                    CreateMonthlyMachWidget(item, tag, "", "nofaults");<br>                    break;<br>            }            <br>        }<br>    }<br><br>    private HtmlAnchor GetAnchor(string cssclass, string onclick, string text, string href)<br>    {<br>        HtmlAnchor anch = new HtmlAnchor();<br>        anch.Attributes.Add("class", cssclass);<br>        if (onclick != string.Empty)<br>        {<br>            anch.Attributes.Add("onclick", onclick);<br>        }<br>        anch.InnerHtml = text;<br>        anch.HRef = href;<br>        return anch;<br>    }<br><br>    private void CreateMonthlyMachWidget(WidgetUser item, string tag, string title, string chartType)<br>    {<br>        //string id = string.Format("Raddock{0}", item.WidgetId);<br>        RadDock dock = CreateRadDock(title, 425, item, tag);<br><br>        MonthlyMachineChart chartControl = (MonthlyMachineChart) LoadControl(dock.Tag);<br>        chartControl.ChartType = chartType;<br>        chartControl.CurrentUser = thisUser;<br>        string href = chartControl.TitleLink;<br>        dock.ContentContainer.Controls.Add(chartControl);<br><br>        //string href = string.Empty; // chartControl.GetTitleLink();<br>        HtmlAnchor anchor = GetAnchor("collect", "", item.WidgetName, href);<br>        //titlebarContainer<br>        if (anchor != null)<br>        {<br>            dock.TitlebarContainer.Controls.Add(anchor);<br>        }<br>        AddDocktoZone(item.Column, dock);<br><br>        CreateSaveStateTrigger(dock);<br>    }<br><br>    private void CreateWidget(WidgetUser item, string tag, string title, HtmlAnchor anchor)<br>    {<br>        //string id = string.Format("Raddock{0}", item.WidgetId);<br>        RadDock dock = CreateRadDock(title, 420, item, tag);<br>        <br>        // content<br>        Control widget = LoadControl(dock.Tag);<br>        dock.ContentContainer.Controls.Add(widget);<br><br>        //titlebarContainer<br>        if (anchor != null)<br>        {<br>            dock.TitlebarContainer.Controls.Add(anchor);<br>        }<br>        AddDocktoZone(item.Column, dock);<br><br>        CreateSaveStateTrigger(dock);<br>    }<br><br>    private void AddDocktoZone(int column, RadDock dock)<br>    {<br>        if (column == 0)<br>        {<br>            RadDockZone0.Controls.Add(dock);<br>        }<br>        else if (column == 1)<br>        {<br>            RadDockZone1.Controls.Add(dock);<br>        }<br>        else if (column == 2)<br>        {<br>            RadDockZone2.Controls.Add(dock);<br>        }<br>    }<br><br>    private void CreateSaveStateTrigger(RadDock dock)<br>    {<br>        //Ensure that the RadDock control will initiate postback<br>        // when its position changes on the client or any of the commands is clicked.<br>        //Using the trigger we will "ajaxify" that postback.<br>        dock.AutoPostBack = true;<br>        dock.CommandsAutoPostBack = true;<br>    }<br><br>    private RadDock CreateRadDock(string title, int width, WidgetUser item, string tag)<br>    {<br>        RadDock dock = new RadDock();<br>        dock.DockMode = DockMode.Docked;<br>        dock.UniqueName = item.WidgetUserId.ToString();<br>        dock.ID = string.Format("RadDock{0}", dock.UniqueName);<br>        dock.Title = title;<br>        dock.Index = item.Row;<br>        dock.Closed = !item.IsActive;<br>        dock.Collapsed = item.Collapsed;<br>        dock.Width = Unit.Pixel(width);<br>        dock.Tag = tag;<br>        dock.EnableAnimation = true;<br>                <br>        dock.Commands.Add(new DockCloseCommand());<br>        dock.Commands.Add(new DockExpandCollapseCommand());<br><br>        return dock;<br>    }<br>    protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)<br>    {<br>        //Populate the event args with the state information. The RadDockLayout control<br>        // will automatically move the docks according that information.<br>        foreach (DockState state in CurrentDockStates)<br>        {<br>            e.Positions[state.UniqueName] = state.DockZoneID;<br>            e.Indices[state.UniqueName] = state.Index;<br>        }<br>    }<br>    protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)<br>    {<br>        CurrentDockStates = RadDockLayout1.GetRegisteredDocksState();<br><br>        //save the layout to the database<br>        for (int i = 0; i < CurrentDockStates.Count; i++)<br>        {<br>            int index = CurrentDockStates[i].DockZoneID.Length-1;<br>            int column = Convert.ToInt32(CurrentDockStates[i].DockZoneID.Substring(index, 1));<br>            bool isActive = !CurrentDockStates[i].Closed;<br>            bool collapsed = CurrentDockStates[i].Collapsed;<br>            int widgetUserId = Convert.ToInt32(CurrentDockStates[i].UniqueName);<br>            WidgetUser.Update(widgetUserId, column, CurrentDockStates[i].Index, isActive, collapsed, connString);<br>        }<br><br>        if (Page.IsPostBack)<br>        {<br>            //LoadWidgets();<br>        }<br>    }<br><br>    private RadDock CreateRadDockFromState(DockState state)<br>    {<br>        RadDock dock = new RadDock();<br>        dock.DockMode = DockMode.Docked;<br>        dock.ID = string.Format("RadDock{0}", state.UniqueName);<br>        dock.ApplyState(state);<br>        dock.Commands.Add(new DockCloseCommand());<br>        dock.Commands.Add(new DockExpandCollapseCommand());<br><br>        return dock;<br>    }<br>}

a.collect<br>{<br>    color: #FFFFFF;<br>    display: inline-block;<br>    height: 15px;<br>    margin: 5px 3px;<br>    text-decoration: none;<br>    width: 226px;  <br>    font-weight:bold;<br>    font-size: 13px;<br>    white-space: nowrap;<br>    overflow: hidden;<br>}


Thanks,
Nagasree

Dobromir
Telerik team
 answered on 17 Jul 2013
1 answer
354 views
Hi
How can I change the color of a row depending on the value of a cell in the row. Somebody please help me out.
thanks
Allen
Princy
Top achievements
Rank 2
 answered on 17 Jul 2013
1 answer
284 views
I have a Telerik RAD Grid which i am bindng on client side. i have another button(Button 2) which when clicked will do a postback and get the values of the grid and call the database to perform some activity, but in the Button 2 Click event, values of the grid are lost and also the grid after Button 2 click has empty data. See below sample code.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test1.aspx.cs" Inherits="WebApplication4.test1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ 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">
<html>
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
        <script type="text/javascript">
 
    function test() {
                var EmployeeInfo = { "Emp_Number": "12349999" }
                var arr = [];
                arr.push(EmployeeInfo);
                grid = $find("<%=rdEmployeeInfo.ClientID %>");
 
                tableView = grid.get_masterTableView();
                tableView.set_dataSource(arr);
                tableView.dataBind();
            }
 
        </script>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
           <asp:button ID="Button1" runat="server" OnClientClick="test(); return false;" />
            <asp:button ID="Button2" runat="server" onclick="Button2_Click" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            <br />
        <telerik:RadGrid ID="rdEmployeeInfo" runat="server" AutoGenerateColumns="false" AllowAutomaticInserts="false"
            AllowAutomaticUpdates="false" EnableAJAX="true" Width="100%" GridLines="None"
            PageSize="1" EnableViewState="true">
            <ItemStyle ForeColor="Orange" />
            <MasterTableView Width="100%" AutoGenerateColumns="false">
                <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                <Columns>
                    <telerik:GridBoundColumn DataField="Emp_Number" HeaderText="Employee Number" ReadOnly="true">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
       
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Services;
using Telerik.Web.UI;
 
namespace WebApplication4
{
    public partial class test1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("Emp_Number");
 
                rdEmployeeInfo.DataSource = dt;
                rdEmployeeInfo.DataBind();
            }
        }
 
      
 
        protected void Button2_Click(object sender, EventArgs e)
        {
 
        }
    }
}
Princy
Top achievements
Rank 2
 answered on 17 Jul 2013
1 answer
111 views
Hi i am using RadWindow.
I just want to open this Window two time.
1st time on a button;s onclick events.
2nd time on a other button;s Onclick Events using Scriptmanager.RegisterStartupScript() ;
at 2nd time its WindowManager is not being set.
so its not showing and my 1st button is being invisible.
Marin Bratanov
Telerik team
 answered on 17 Jul 2013
2 answers
384 views
I have a RadGrid Insert/Edit Form template in which I have a Submit/Update button. This button's submit behavior works perfectly if I do not reference any JavaScript calls in it. However, upon inserting an OnClientClick, it breaks the button. Here is the ASP

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' OnClientClick="return CheckWeight()" />

Here is the JavaScript

function CheckWeight() {
                var currentGoalWeightTotal = $("[id$='CurrentGoalWeightTotal']").val();
                var weightInput = $("[name$='AG_Weight']").val();
 
                if (parseInt(weightInput) + parseInt(currentGoalWeightTotal) > 100) {
                    alert("Please make sure that your goal weight total does not exceed 100.");
                    return false;
                }                   
            }

pmourfield
Top achievements
Rank 1
 answered on 17 Jul 2013
4 answers
117 views
We've implemented the RadEditor control with track changes switched on and were hoping that the following scenario would be possible:

  1. User A adds some text, which is recorded as an insert.
  2. User B edits the inserted text by adding some more inside it, which causes a nested insert.

What we've found is that actually, the second edit won't allow changes to be made to the text User A inserted, and any additional text falls outside that original insert.

Is this by design, or is there a way to get it working?


Thanks,

Matt
Matt
Top achievements
Rank 1
 answered on 17 Jul 2013
4 answers
246 views
Hello
  I have a radmenu inside a radpane and there are radpanes within splitbars on left and bottom of the menu i want the parent menu to be inside its own radpane but only the submenu should overlay i have tried styple position and z index when i apply to that to menu the parent radmenu is coming  out of the radpane i just want the submenu to come up i have included an image of the problem.

Thank you
JJ
Kate
Telerik team
 answered on 17 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?