Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
223 views

Hello
I’m using RadScheduler and I’m getting an error when I hit the snooze button the second time.  I have past appointments that I snooze for 5 minutes but then, the reminder dialog pops up again immediately (did not wait 5 minutes) and it gives an error that says “Error: Object doesn't support property or method 'clone'”

Please see pictures attached

Your help will be apprecited

Thanks

Plamen
Telerik team
 answered on 08 Mar 2012
3 answers
82 views

 

how could disable the option to not be able to click on the Timeslot, where it creates the appointment.

thanks for your help 
Plamen
Telerik team
 answered on 08 Mar 2012
7 answers
433 views
I have created a quick sample app to demastrate a problem I am having where by a button does not fire the event when its in the item template for a node.

The idea behind the sample code is that the last button on a node you click it should dissapear, but it only works every other time.


Create a control called OrgChartControl (see below for content), add the control to a page and run the page.

Many thanks for any help you may be able to give 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrgChartControl.ascx.cs" Inherits="RadOrgChartTest.OrgChartControl" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <div>
        <telerik:RadOrgChart runat="server" ID="RadOrgChart1" Skin="Office2007">
            <ItemTemplate>
              
                            <asp:ImageButton ID="ZoomToButton" runat="server"
                                Style="cursor: pointer"
                                CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>'
                                OnClick="ZoomToButton_OnClick"
                                Visible='<%#Eval("NotLastClicked")%>' />
                          
            </ItemTemplate>
        </telerik:RadOrgChart>

       </div>



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RadOrgChartTest
{
    public partial class OrgChartControl : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            update(0);
        }

 

        private void update(int LastClicked)
        {
           RadOrgChart1.DataTextField = "Label";
            RadOrgChart1.DataFieldID = "Id";
            RadOrgChart1.DataFieldParentID = "Parent";

            RadOrgChart1.DataSource = GetDataFromDatabase(LastClicked);
            RadOrgChart1.DataBind();
       
        }

        protected void ZoomToButton_OnClick(object sender, EventArgs e)
        {
            update( int.Parse(((ImageButton)sender).CommandArgument));
        }

 

        private class FakeData
        {
            public string Label {get;set;}
            public int Id {get;set;}
            public int? Parent {get;set;}
            public bool NotLastClicked {get;set;}
        }

        private List<FakeData> GetDataFromDatabase(int LastClicked)
        {

            List<FakeData> r = new List<FakeData>();
            r.Add(new FakeData { Label = "Parent", Id = 1, Parent = null, NotLastClicked = LastClicked!= 1 });
            r.Add(new FakeData { Label = "Node a", Id = 2, Parent = 1, NotLastClicked = LastClicked != 2 });
            r.Add(new FakeData { Label = "Node b", Id = 3, Parent = 1, NotLastClicked = LastClicked != 3 });
            r.Add(new FakeData { Label = "Node c", Id = 4, Parent = 1, NotLastClicked = LastClicked != 4 });
            r.Add(new FakeData { Label = "Node d", Id = 5, Parent = 1, NotLastClicked = LastClicked != 5 });

            return r;
        }

    }
}




Peter Filipov
Telerik team
 answered on 08 Mar 2012
7 answers
198 views
Hi there,

I'm using:

Visual Studio 2010
AJAX Q2 2011 2011.2.712.35 (Bin35)

I use the RadScriptManager to include all my CSS - I'm successfully including my own stylesheets, as well as a custom skin:

(web.config)
<add key="Telerik.Web.UI.StyleSheetFolders" value="~/_Resources/CSS/" />
<add key="Telerik.Skin" value="IntranetSkin" />
<add key="Telerik.EnableEmbeddedSkins" value="false" />
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />

(Base.Master)
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" EnableStyleSheetCombine="true">
    <StyleSheets>
        <telerik:StyleSheetReference Path="~/_Resources/CSS/base.css" />
        <telerik:StyleSheetReference Path="~/_Resources/CSS/start/jquery-ui-1.8.15.custom.css" />
        <telerik:StyleSheetReference Path="~/_Resources/CSS/styles.css" />
        <telerik:StyleSheetReference Name="Telerik.Web.UI.Skins.Menu.css" Assembly="Telerik.Web.UI" />
        <telerik:StyleSheetReference Name="Telerik.Web.UI.Skins.Grid.css" Assembly="Telerik.Web.UI" />
    </StyleSheets>
</telerik:RadStyleSheetManager>

However, when I do something like this (these classes apply background images to the elements):

(index.aspx)
<div class="ui-state-default ui-corner-all">
    <span class="ui-icon ui-icon-circle-zoomin"></span>
</div>

I get the following 404 errors (via Chrome's error console):

GET http://localhost:411/images/ui-bg_glass_45_0078ae_1x400.png 404 (Not Found)
GET http://localhost:411/images/ui-icons_e0fdff_256x240.png 404 (Not Found)

The files in question exist in http://localhost:411/_Resources/CSS/start/images/, and they're referenced correctly by the JQuery UI CSS file:

(_Resources/CSS/start/jquery-ui-1.8.15.custom.css)
.ui-state-default .ui-icon { background-image: url(images/ui-icons_e0fdff_256x240.png); }

If I include the CSS outside of the StyleSheetManager:

(Base.Master)
<link type="text/css" href="~/_Resources/CSS/start/jquery-ui-1.8.15.custom.css" rel="Stylesheet" />

then things work as expected. I don't seem to have problems with background-image URLs in my other included CSS files.

Any ideas?

Thanks,
Rob
Simon
Telerik team
 answered on 08 Mar 2012
5 answers
249 views
I have data that I need to add a point for each day. I have my code working well enough to label my x axis as mar feb apr etc. Where I'm stuck is on how I add all of the data points.
I have the stored in a datatable with three fields, label (the month), position (an int of its position i.e. 0 is jan, 1 is feb etc), and value (the daily value)

Here's the code I have so far on trying to add the points but it doesn't seem to be working. I'm fairly new with these charts, so please bear with me.

'a holder for the current month
        Dim currentMonth = ""
 
        'a holder for the count
        Dim count = -1
 
        Dim rangeTable As New DataTable
        rangeTable.Columns.Add("Label")
        rangeTable.Columns.Add("Position")
        rangeTable.Columns.Add("Value")
 
 
        Using myconn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("connection").ToString)
 
            myconn.Open()
            Dim cmd = New SqlCommand(sql, myconn)
            Dim reader = cmd.ExecuteReader()
            While reader.Read()
 
                'if the currentMonth is new, then we add it to the data table for a range
                If Not (currentMonth = (Format(reader("DateHour"), "MMMM"))) Then
                    currentMonth = Format(reader("DateHour"), "MMMM")
 
                    count = count + 1
                 
                End If
 
                rangeTable.Rows.Add(currentMonth, count, reader("PointAverage"))
 
                'Dim tempSeries As New ChartSeries
                'tempSeries.SetValues(1, 2)
                'chart.Series.Add(tempSeries)
 
            End While
 
            myconn.Close()
 
        End Using 'using myconn
 
        'add the range
        chart.PlotArea.XAxis.AddRange(0, count, 1)
 
        For Each i As DataRow In rangeTable.Rows
            chart.PlotArea.XAxis(i("Position")).TextBlock.Text = i("Label")
            Dim tempSeries As New ChartSeries
            tempSeries.SetValues(i("Position"), i("Value"))
            chart.Series.Add(tempSeries)
        Next

A sample of what my data table would look like is something like this
Label Position Value
january 0 10
january 0 20
january 0 30
february 1 10
february 1 20
etc. 

Essentially, I need to add all of the points in each month, but they are in succession by day. So I pull all of the days for jan, feb, and so on. Any ideas on how to go about this?





Web Services
Top achievements
Rank 2
 answered on 08 Mar 2012
1 answer
186 views
With this code, i try to Close a Window (the way i'm doing it works) but i have also an Onclick event which is ignored!

<script type="text/javascript">
 
 
             function GetRadWindow() {
                 var oWindow = null;
                 if (window.radWindow) oWindow = window.radWindow;
                 else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                 return oWindow;
             }
 
             function CloseDialog() {
                 GetRadWindow().close();
                 
             
              
</script>


ASPX page:

           

<asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket"
               onclick="Button1_Click"  OnClientClick="CloseDialog()"/>


My application never enters Button1_click event, can anyone help me to find out why ?
thanks in advance



EDIT: HTML GENERATED FOR THE BUTTON
<input type="submit" id="Button1" onclick="CloseDialog();" value="Soumettre ce ticket" name="Button1"/>
Ronan BARRANGER
Top achievements
Rank 1
 answered on 08 Mar 2012
1 answer
399 views
Hi

I currently use RadGrids for displaying data on mobile devices and am having trouble with the Client Side Select column.  It will only allow a single select to be made even though multi row select is true - it works fine on a PC browser.

Will switching to the Kendo UI Grid be more compatible with mobile browsers and if so what is the transition from RadGrid to KendoGrid like, for example can I still bind to a list of items server side during page load?

Cheers
Cliff
Stuart Hemming
Top achievements
Rank 2
 answered on 08 Mar 2012
1 answer
137 views
I'm having trouble with IE not handling and producing the same results  with bulleted lists than other browsers.

I've pasted the same HTML in the online demo on Telerik and I still get the same issues across browsers.

The following is HTML created by my client, you can see a mix of P tabs and BR tags, but yet when highlighting two paragraphs, the browsers handle creating the bullets positions differently.


<p><strong>Lorem ipsum dolor sit amet, consectetur  <br />
Lorem ipsum dolor sit amet, consectetur  <br />
Lorem ipsum dolor sit amet, consectetur </strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ultricies dignissim diam, sed vestibulum metus semper sed. Nullam cursusLorem ipsum dolor sit amet, consectetur. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ultricies dignissim diam, sed vestibulum metus semper sed. Nullam . <br />
<br />
<strong>Lorem ipsum</strong> <br />
<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ultricies dignissim diam, sed vestibulum metus semper sed. Nullam cursusLorem ipsum dolor sit amet, consectetur </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ultricies dignissim diam, sed vestibulum metus semper sed. Nullam cursus. </p>
<p><strong>Lorem ipsum :</strong> </p>
<ul>
    <li>Lorem ipsum dolor sit amet, consectetur </li>
    <li>Lorem ipsum dolor sit amet, consectetur  </li>
    <li>Lorem ipsum dolor sit amet, consectetur </li>
    <li>Lorem ipsum dolor sit amet, consectetur (optional)  </li>
    <li>Lorem ipsum dolor sit amet, consectetur </li>
    <li>A Lorem ipsum dolor sit amet, consectetur  </li>
    <li>Lorem ipsum dolor sit amet, consectetur  </li>
    <li>Lorem ipsum dolor sit amet, consectetur </li>
    <li>Lorem ipsum dolor sit amet, consectetur Lorem ipsum dolor sit amet, consectetur </li>
    </ul>
<p> </p>
Rumen
Telerik team
 answered on 08 Mar 2012
1 answer
78 views
Hi there,

I am using jScrollPane (http://jscrollpane.kelvinluck.com/) for one of my project.

Whenever the scroller from jScrollPane is showing, none of the RadInput (RadTextBox, RadDateTimePicker) is selectable. It is like they are being disabled.

But if I am using the regular ASP.NET TextBox, this issue doesn't happen.

This only happens when i am using Chrome and FireFox. On IE 9, it works fine.

Below is the code i use to demonstrate the problem. The first DIV will show the scroller, the second DIV won't show the scroller. In the first DIV, I can't type anything to the RadTextBox, but on the normal TextBox, it is working.

On the second DIV, where the scroller is not showing, both textbox are working.

Thanks.

<!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>
    <style type="text/css">
        html, body, form
        {
            margin: 0px;
            padding: 0px;
            width: 100%;
            height: 100%;
            overflow: hidden;
            color: #555555;
        }
        .left-scroll, .pane-scroller
        {
            outline: none !important;
        }
         
        .jspContainer
        {
            overflow: hidden;
            position: relative;
        }
         
        .jspPane
        {
            position: absolute;
        }
         
        .jspVerticalBar
        {
            position: absolute;
            top: 0;
            right: 0;
            width: 16px;
            height: 100%;
            border: 1px solid #999;
            border-right: 0px;
        }
         
        .jspHorizontalBar
        {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 16px;
        }
         
        .jspVerticalBar *, .jspHorizontalBar *
        {
            margin: 0;
            padding: 0;
        }
         
        .jspCap
        {
            display: none;
        }
         
        .jspHorizontalBar .jspCap
        {
            float: left;
        }
         
        .jspTrack
        {
            background: #fff;
            position: relative;
            border-top: 1px solid #999;
            border-bottom: 1px solid #999;
        }
         
        .jspDrag
        {
            background: #666;
            background: #8DBB40;
            position: relative;
            top: 0;
            left: 0;
            cursor: pointer;
            border-top: 1px solid #999;
            border-bottom: 1px solid #999;
        }
         
        .jspHorizontalBar .jspTrack, .jspHorizontalBar .jspDrag
        {
            float: left;
            height: 100%;
        }
         
        .jspArrow
        {
            background: #50506d;
            text-indent: -20000px;
            display: block;
            cursor: pointer;
        }
         
        .jspArrow.jspDisabled
        {
            cursor: default;
            background: #80808d;
        }
         
        .jspVerticalBar .jspArrow
        {
            height: 16px;
        }
         
        .jspHorizontalBar .jspArrow
        {
            width: 16px;
            float: left;
            height: 100%;
        }
         
        .jspVerticalBar .jspArrow:focus
        {
            outline: none;
        }
         
        .jspCorner
        {
            background: #eeeef4;
            float: left;
            height: 100%;
        }
         
        /* Yuk! CSS Hack for IE6 3 pixel bug :( */
        * html .jspCorner
        {
            margin: 0 -3px 0 0;
        }
         
        .jspArrowUp, .jspArrowUp.jspDisabled
        {
            background-color: #c0c0c0;
            background-position: 1px 0px !important;
        }
         
        .jspArrowDown, .jspArrowDown.jspDisabled
        {
            padding-bottom: 2px;
            background-color: #c0c0c0;
            background-position: -64px 0 !important;
        }
         
        .jspArrowLeft, .jspArrowLeft.jspDisabled
        {
            background-color: #c0c0c0;
            background-position: -96px 0 !important;
        }
         
        .jspArrowRight, .jspArrowRight.jspDisabled
        {
            background-color: #c0c0c0;
            background-position: -32px 0 !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="TestRadScriptManager" runat="server">
    </telerik:RadScriptManager>
    <div class="pane-scroller" style="width: 100%; height: 100px;">
        <telerik:RadTextBox ID="tbRetypePassword" runat="server" Width="200px">
        </telerik:RadTextBox>
        <asp:TextBox ID="TextBox1" runat="server" Text="aasaasasd"></asp:TextBox>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </div>
        <div class="pane-scroller" style="width: 100%; height: 500px;">
        <telerik:RadTextBox ID="RadTextBox1" runat="server" Width="200px">
        </telerik:RadTextBox>
        <asp:TextBox ID="TextBox2" runat="server" Text="aasaasasd"></asp:TextBox>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </div>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.mousewheel.js"></script>
    <script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.jscrollpane.min.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {
            ReloadScroller();
        });
        function ReloadScroller() {
            $(function () {
                $('.pane-scroller').jScrollPane(
                {
                    showArrows: true,
                    horizontalGutter: 10
                }
                );
            });
        }
    </script>
    </form>
</body>
</html>

Galin
Telerik team
 answered on 08 Mar 2012
2 answers
166 views
I have a data bound grid that also contains two template columns.  One column contains a checkbox, the other contains a textbox.  Only if the checkbox is checked should the textbox be enabled.  I have added code that does this on the server side, but I'd rather execute this on the client side to reduce processing on the server.

Here's the grid definition:

<telerik:RadGrid ID="grdContentManagement" runat="server" SkinID="StaticColumnsNoPagingBuiltInSorting"
        OnItemCommand="ContentManagementGridItemCommand" OnNeedDataSource="grdContentManagement_NeedDataSource"
        OnItemDataBound="grdContentManagement_OnItemDataBound" CellSpacing="0" GridLines="None"
        AllowSorting="True" AllowPaging="True" PageSize="15" Height="478" ShowFooter="false">
        <MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" AllowSorting="true">
            <Columns>
                <telerik:GridTemplateColumn UniqueName="Selected" HeaderText="Display" HeaderStyle-HorizontalAlign="Center"
                    HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelected" runat="server" onclick="CheckBoxClicked(this)" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderText="Property" UniqueName="PropertyName" DataField="PropertyName"
                    SortExpression="PropertyName" HeaderStyle-Width="200px">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="DisplayName" HeaderText="Label" HeaderStyle-Width="200px"
                    SortExpression="DisplayName">
                    <ItemTemplate>
                        <telerik:RadTextBox ID="txtDisplayName" runat="server" MaxLength="255" Width="100%" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderText="Data Type" DataField="DataType" SortExpression="DataType"
                    HeaderStyle-Width="100px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Object Type" DataField="ObjectType" SortExpression="ObjectType" />
                <telerik:GridBoundColumn DataField="Id" SortExpression="Id" Visible="false" />
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling UseStaticHeaders="False" />
            <Resizing EnableRealTimeResize="true" />
        </ClientSettings>
        <FilterMenu EnableImageSprites="False">
            <WebServiceSettings>
                <ODataSettings InitialContainerName="">
                </ODataSettings>
            </WebServiceSettings>
        </FilterMenu>
    </telerik:RadGrid>


I create the checkboxes as follows:

protected void grdContentManagement_OnItemDataBound(object sender, GridItemEventArgs e)
{
    GridDataItem item = e.Item as GridDataItem;
    if (item != null)
    {
        TelerikGridHelper.SetGridToolTips(item as GridDataItem);
        TelerikGridHelper.SetGridHtmlEncode(item as GridDataItem);
         
        CheckBox chkBox = (CheckBox)item["Selected"].Controls[1];
        chkBox.Checked = ((ContentManagementFieldForDisplay)(item.DataItem)).Selected;
        chkBox.Attributes.Add("rowIndex", item.ItemIndex.ToString());
 
        RadTextBox txtBox = (RadTextBox)item["DisplayName"].Controls[1];
        txtBox.Text = ((ContentManagementFieldForDisplay)(item.DataItem)).DisplayName;
    }
}


The issue I'm experiencing is that I can't figure out how to access the textbox based on the checkbox row index on the client side.  If I place an alert in the following code, it will fire whenever the box is checked/unchecked, so I know it's reaching that point in code, but trying to access the "rowIndex" attribute I defined for the checkbox on the server side doesn't work.

function CheckBoxClicked(checkBox) {
 
    if (checkBox.checked) {
        //enable the textbox
    }
    else {
        //disable the textbox
    }
}

Any ideas?
Matt
Top achievements
Rank 1
 answered on 08 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?