Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
62 views

Hi...

 i'm not bale to get the Date formate in 07-Apr-2015 i want this formate in  X axis  with Date and my Date is Overlapping each other sometime and line is also Not coming in middle of the Date 

Danail Vasilev
Telerik team
 answered on 07 Apr 2015
1 answer
119 views
It appears that nesting PageLayout controls (for example parent in Master page and child in Content page) causes the child control to be padded on all sides by roughly 20-30 px. What is the cause and a solution?
Magdalena
Telerik team
 answered on 07 Apr 2015
2 answers
147 views

I have a RangeBarChart where the X Axis represents the time of the day from 6am to 10pm.  The Y Axis represents a number of events.  Each event consists of a StartTime variable and an EndTime variable (both are DateTime datatypes).  I am adding the Series programmatically in ASP.NET VB.  

The data is pulled from an SQL Database.  When I assign the variables, I get a "Specified cast is not valid".  Presumably, the RangeSeriesItem is looking for a different datatype than DateTime.

While UserReader.Read()
                Dim AdjudicatorSeriesItem As New RangeSeriesItem(UserReader("fldNotesDateStart"), UserReader("fldNotesDateEnd"))
                AdjudicatorSeries.SeriesItems.Add(AdjudicatorSeriesItem)
 
End While

 

Any ideas?

 

Danail Vasilev
Telerik team
 answered on 07 Apr 2015
3 answers
234 views

Please help me to fix the following error: 

Using: Microsoft Visual Studio Ultimate 2012, UI for ASP.NET AJAX Q1 2015

 

Server Error in '/SmartTrace' Application.Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.

Source Error: 

Line 47: for (int i = 0; i < states.Length; i++)
Line 48: {
Line 49: DockState state = DockState.Deserialize(states[i]);
Line 50: e.Positions[state.UniqueName] = state.DockZoneID;
Line 51: e.Indices[state.UniqueName] = state.Index;
Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs    Line: 49 

Server Error in '/SmartTrace' Application.Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.

Source Error: 

Line 47: for (int i = 0; i < states.Length; i++)
Line 48: {
Line 49: DockState state = DockState.Deserialize(states[i]);
Line 50: e.Positions[state.UniqueName] = state.DockZoneID;
Line 51: e.Indices[state.UniqueName] = state.Index;
Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs    Line: 49 
:

Server Error in '/Website1' Application.
 
Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.ArgumentException: Invalid JSON primitive: **{"DockZoneID":"RadDockZone2","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock2","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***{"DockZoneID":"RadDockZone3","Width":{"Type":1,"Value":300,"IsEmpty":false},"ExpandedHeight":0,"Height":{"Type":1,"Value":0,"IsEmpty":true},"Index":0,"Top":{"Type":1,"Value":0,"IsEmpty":false},"Left":{"Type":1,"Value":0,"IsEmpty":false},"Closed":false,"Resizable":false,"Collapsed":false,"Pinned":false,"UniqueName":"RadDock3","Tag":null,"Title":"","Text":"","ControlSettings":[],"UniqueId":null,"UniqueKey":null}***.
 
Source Error:
 
 
Line 47:                 for (int i = 0; i < states.Length; i++)
Line 48:                 {
Line 49:                     DockState state = DockState.Deserialize(states[i]);
Line 50:                     e.Positions[state.UniqueName] = state.DockZoneID;
Line 51:                     e.Indices[state.UniqueName] = state.Index;
 
Source File: d:\Projects\SmartTrace\Dashboard3.aspx.cs    Line: 49

 

ASPX Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Dashboard3.aspx.cs" Inherits="Dashboard3" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
 
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
     
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
                 
        <div>
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" OnLoadDockLayout="RadDockLayout1_LoadDockLayout" EnableViewState="False" StoreLayoutInViewState="True">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="Dock 1" >
                        <ContentTemplate>
                            content 1
                        </ContentTemplate>
                    </telerik:RadDock>
                    <telerik:RadDock ID="RadDock2" runat="server" Width="300px" Title="Dock 2" >
                        <ContentTemplate>
                            content 2
                        </ContentTemplate>
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
 
        </div>
    </form>
 
 
</body>
</html>

 

C# Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class Dashboard3 : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
        //RadDockLayout1.Controls.Add(RadDockZone1);
        //RadDockLayout1.Controls.Add(RadDockZone2);
        //RadDockLayout1.Controls.Add(RadDockZone3);
         
        //RadDockLayout1.Controls.Add(RadDock1);
        //RadDockLayout1.Controls.Add(RadDock2);
        //RadDockLayout1.Controls.Add(RadDock3);
 
       
 
 
 
    }
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
 
    protected void RadDockLayout1_SaveDockLayout(object sender, Telerik.Web.UI.DockLayoutEventArgs e)
    {
        HttpCookie dockState = Page.Response.Cookies.Get("DashboardDockStates");
        if (dockState == null)
        {
            dockState = new HttpCookie("DashboardDockStates");
            Page.Response.Cookies.Add(dockState);
        }
        List<DockState> stateList = ((RadDockLayout)sender).GetRegisteredDocksState();
        StringBuilder serializedList = new StringBuilder();
        for (int i = 0; i < stateList.Count; i++)
        {
            serializedList.Append(stateList[i].ToString());
            serializedList.Append("|");
        }
        dockState.Expires = DateTime.Today.AddMonths(1);
        dockState.Value = serializedList.ToString();
 
    }
    protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)
    {
        HttpCookie dockState = Page.Request.Cookies.Get("DashboardDockStates");
        if (dockState != null)
        {
            string serializedList = dockState.Value;
            if (serializedList != null)
            {
                string[] states = serializedList.Split('|');
                for (int i = 0; i < states.Length; i++)
                {
                    DockState state = DockState.Deserialize(states[i]);
                    e.Positions[state.UniqueName] = state.DockZoneID;
                    e.Indices[state.UniqueName] = state.Index;
                }
            }
        }
    }
 
     
}
 

 

 

 

Slav
Telerik team
 answered on 07 Apr 2015
2 answers
105 views
I have a RadGrid which uses a SqlDataSource for adding, editing, deleting records.

When I click edit all the controls are standard asp.net controls (texboxes, checkboxes, etc) which means I cannot apply the Skin attribute.

How can I change those controls to telerik controls so I can style them like the rest of the grid view?
Silviu
Top achievements
Rank 1
 answered on 07 Apr 2015
2 answers
100 views
We just upgraded our site from v2013.1.220.40 to 2015.1.401.45 and we are now getting the following error when the chart is updated.
 
TypeError: chart._chartConfig is undefined
var xAxisItems = chart._chartConfig.categoryAxis.categories;
----^

please can anyone give me a clue on how to fix this?

Thanks.

<telerik:RadCodeBlock ID="RadProductGrowthCodeBlock" runat="server">
    <script type="text/javascript">
        var ProductGrowth = function() {
            return {
                PageLoad: function() {
                    this.showChartLoading();

                    var cmb = $find('<%= cmbProduct.ClientID %>');
                    if (cmb) {
                        var selectedValue = cmb._value;
                        if (!selectedValue) {
                            selectedValue = cmb._itemData[0].value;
                        }
                        Nimbis.Website.Private.Dashboard.CustomControl.GetProductGrowthSummaryData(selectedValue, this.updateChart);
                    }
                },
        
                updateChart: function(result) {
                    var chart = $find('<%= ProductGrowthChart.ClientID %>');
            
                    if (chart) {
                        var xAxisItems = chart._chartConfig.categoryAxis.categories;
                        // A placeholder item has been created in order to create the category element. This is done to enable us to amend the element client side
                        // Here we delete the temporary placeholder and any other elements that might exist in order to add new items
                        xAxisItems.splice(0, xAxisItems.length);

                        chart.set_dataSource(result);

                        result.forEach(function(item) {
                            chart._chartConfig.categoryAxis.categories.push(item.Period);
                        });

                        chart.repaint();
                    }

                    ProductGrowth.hideChartLoading();
                },
        
                ProductChange: function(sender, eventArgs) {
                    ProductGrowth.showChartLoading();
                    Nimbis.Website.Private.Dashboard.CustomControl.GetProductGrowthSummaryData(sender._value, ProductGrowth.updateChart);
                },
        
                showChartLoading: function() {
                    var loadingPanel = $find('<%= ProductGrowthLoadingPanel.ClientID %>');
                    if (loadingPanel) {
                        $find('<%= ProductGrowthLoadingPanel.ClientID %>').show('<%= ProductGrowthChart.ClientID %>');
                    }
                },

                hideChartLoading: function() {
                    var loadingPanel = $find('<%= ProductGrowthLoadingPanel.ClientID %>');
                    if (loadingPanel) {
                        $find('<%= ProductGrowthLoadingPanel.ClientID %>').hide('<%= ProductGrowthChart.ClientID %>');
                    }
                }
            };
        }()
    </script>
</telerik:RadCodeBlock>

            <telerik:RadHtmlChart ID="ProductGrowthChart" runat="server" Height="280px">
                <ChartTitle>
                <Appearance>
                <TextStyle FontSize="16px"></TextStyle>
                </Appearance>
                </ChartTitle>
                <PlotArea>
                    <XAxis AxisCrossingValue="0" Color="#b3b3b3" MajorTickType="Outside" MinorTickType="Outside" Reversed="false">
                        <LabelsAppearance RotationAngle="15"></LabelsAppearance>
                        <Items>
                            <telerik:AxisItem LabelText=""></telerik:AxisItem>
                        </Items>
                    </XAxis>
                    <Series>
                        <telerik:LineSeries DataFieldY="Amount" ColorField="Color">
                        </telerik:LineSeries>
                    </Series>
                </PlotArea>
            </telerik:RadHtmlChart>
Jason
Top achievements
Rank 1
 answered on 07 Apr 2015
1 answer
129 views
I need a comparevalidator on the grid for CDRQTY during edit at entering data; at present I'd like to be able to set the column listed below so, that the value will be less than or equal to the DQTY-DRQTY.   In this way the CDRQTY Entered Value can only be the remaining amount of the Ordered - Received.

Any help here would be greatly appreciated; of note since I am not doing an add the ItemCreated will not work...I am doing an Update.

<telerik:RadGrid ID="rgRequests" runat="server"  Skin="Metro" OnItemCreated="rgRequests_ItemCreated" OnUpdateCommand="rgRequests_UpdateCommand" OnNeedDataSource="rgRequests_NeedDataSource" AllowMultiRowEdit="true" MasterTableView-EditMode="Batch" MasterTableView-ClientDataKeyNames="DPO,DLINE,DQTY,DRQTY" AutoGenerateColumns="false">
    <MasterTableView CommandItemDisplay="TopAndBottom" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="true" CommandItemSettings-ShowSaveChangesButton="true" CommandItemSettings-ShowCancelChangesButton="true">
        <Columns>
            <telerik:GridBoundColumn HeaderText="PO#" DataField="DPO" ReadOnly="true" />
            <telerik:GridBoundColumn HeaderText="LINE" DataField="DLINE" ReadOnly="true" />
            <telerik:GridBoundColumn HeaderText="Item" DataField="DITEM" ReadOnly="true" />
            <telerik:GridBoundColumn HeaderText="Ordered" DataField="DQTY" ReadOnly="true"/>
            <telerik:GridBoundColumn HeaderText="Received" DataField="DRQTY" ReadOnly="true" />
            <telerik:GridNumericColumn HeaderText="Received Today" DataField="CDRQTY" ColumnEditorID="CDRQTY" DataType="System.Int32" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


Konstantin Dikov
Telerik team
 answered on 07 Apr 2015
3 answers
148 views
I replaced Telerik.Web.UI and Telerik.Web.Design libraries with version 2015.1.318.40 and then project stopped compiling. Please see the attached error screenshot. Any help would be appreciated

Error 1 'Could not load file or assembly 'Telerik.Web.UI, Version=2015.1.318.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)' D:\JAISH\JQUERY - SUBMIT\WebApplication1\WebApplication1\LC WebApplication1

.The file which is throwing error is LC as per VS, but I haven't any files like that. 
Kostadin
Telerik team
 answered on 07 Apr 2015
1 answer
81 views

hi 

I need use session in ResourceStyleMapping Scheduler

I use below code but don't work correctly :

         <ResourceStyles>
                <telerik:ResourceStyleMapping Type="User" Key= '<%= Session["user_Id"] %>' BackColor="Aqua"></telerik:ResourceStyleMapping>
                <telerik:ResourceStyleMapping Type="User" Key="1" BackColor="Aqua"></telerik:ResourceStyleMapping>
</ResourceStyles>

 

please help me.

Plamen
Telerik team
 answered on 07 Apr 2015
1 answer
226 views
Hi,

We have a SharePoint page using RADEditor for the content. The issue we have is that when we edit the page, on the RAD Editor window, there is very small area on the left & right side of the window that when you click on it, the cursor jumps to the bottom of the page then comes back up to where it was click (or somewhere near where it was clicked). It's causing some problem because when users try to highlight a paragraph, when they click at the starting point and drag to choose the rest of the paragraph, it jumps to the bottom of the page, as a result, the user gets confused because they are now highlighting the bottom paragraph/content of the page as opposed to the one they selected originally. I've seen similar issues in this forum (although a different flavor - i.e.the cursor jumps to the top when pressing enter or when hovering the mouse outside the editor window). Is anyone experiencing the same problem as we do? Any information or assistance is greatly appreciated.

I have attached a sample image of the RadEditor in action (Edit mode). If you noticed on the left side and right side of the editor, there is a very small area where the jumping occurs. I added a border to illustrate. Every time we click outside of that border (within that small area to the left & right of the editor), the cursor jumps to the bottom of the editor then goes back up again to (or near) where it was last clicked.
Ianko
Telerik team
 answered on 07 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?