Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
275 views
I am trying to set the background color on the thumbnail area. Its BLACK, i tried css but it didn't work.

.RadImageGallery .rigThumbnailsList {
    background-color: white;
}

I also get an error once lightbox is loaded from the thumbnail click event.

Say i have 6 images in the thumbnail and i click any thumbnail to open LightBox. It pops up with the correct image and showing say "Image 4 of 6" then i click one of the buttons to navigate and i get an ".../store/fake" - file does not exist. We dont have a fake directory, all files are loaded with advanced databinding. So confused why its looking for a file.

Also when i click again in the gallery after closing the lightbox, it seems its still loaded in memory. The image 4 is still showing from last click then it suddenly switches to say "2" which i just clicked to reopen the light box. Do i have to destroy lightbox after its closed?
Angel Petrov
Telerik team
 answered on 07 Apr 2015
1 answer
60 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
117 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
146 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
232 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
102 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
97 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
128 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
146 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?