Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
173 views
Hello,

I have a RadTreeView control that fails with the following error, if I populate it with a large (say, 2000) number of nodes:

"Error during serialization or deserialization using the JSON JavaScriptSerializer.  The length of the string exceeds the value set on the maxJsonLength property."

I am able to set the maxJsonLength property in the web.config of my application - however no matter what value I give to maxJsonLength (up to Int32.MaxValue), the above error appears.  I've tried every combination of maxJsonLength value and number of nodes in my tree.  

In the Microsoft docs (http://msdn.microsoft.com/en-us/library/system.web.configuration.scriptingjsonserializationsection.maxjsonlength(v=VS.90).aspx), it says:

"The value of the MaxJsonLength property applies only to the internal JavaScriptSerializer instance that is used by the asynchronous communication layer to invoke Web services methods."

So now I'm thinking that RadTreeView doesn't pay attention to maxJsonLength.  Is this correct?

Thanks,
Leigh
Leigh
Top achievements
Rank 1
 answered on 19 Apr 2011
3 answers
132 views
How can I set the default height for a RadScheduler that's using the timeline view? I don't want to set a fixed height, cause I want it to grow vertically when I add resources.

Thanks
Veronica
Telerik team
 answered on 19 Apr 2011
3 answers
98 views
Hi,

When I enter some invalid data into a RadDateTimePicker, the field is marked as invalid (warning triangle and red border)- That's nice and fine.
But when I submit the form, however, the page is considered as valid (this.IsValid returns true) and the postback is executed.

How can I prevent the form to do a postback on invalid data?

Thanks in advance.
Maria Ilieva
Telerik team
 answered on 19 Apr 2011
2 answers
158 views
Hi,

One of my users is having an issue with selecting items in a RadListBox.  When they click on an item in the ListBox, characters in the text of the item is highlighted, but the actual item is not selected.  It is very strange behaviour.  This problem is occuring in all browser, but only on one particular computer.  I have not been able to replicate the problem myself  It has me completely stumped.  Does anyone have any ideas what could be causing this?

See the attached screenshot for an example of the problem.  The user has clicked on the fifth item in the listbox (Hulland) but as you can see the text "Hulland" gets highlighted, but he listitem is not selected.

Thanks
Andrew Dixon
Peter Filipov
Telerik team
 answered on 19 Apr 2011
1 answer
173 views
Hello ,

        I have a RadGrid in my page. The PagerItems are created using PagerTemplate.. I have asp buttons, ComboBox, RadNumerictextbox and a NumericPager. The code for pagertemplate is described below. I am using an ASP Panel for placing NumerPager in Pagertemplate.
<telerik:RadGrid ID="radgdSuccessionList" runat="server"   Font-Names="Verdana"  Skin="Marzar" EnableEmbeddedSkins="false" AutoGenerateColumns="False"  AllowMultiRowSelection="true"  >
            <ClientSettings  EnablePostBackOnRowClick="false" >
                <Selecting AllowRowSelect="True" />                                       
            </ClientSettings>
            <MasterTableView AllowPaging="true">
                <PagerTemplate>
                    <asp:Panel ID="PagerPanel" Style="padding: 6px" runat="server">
                        <div style="float: left">
                            <span style="margin-top: 2px; float: left; margin-right: 3px;font-size:8pt;">Page size:</span>
                            <telerik:RadComboBox Skin="Office2007" ID="RadComboBox1" DataSource="<%# new object[]{10, 20, 30, 40, 50} %>"
                                Style="margin-top: 2px;float: left; vertical-align: baseline; margin-right: 20px; text-align:center; height:25px"
                                Width="40px" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>'
                                runat="server" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged1" CssClass="CustomCssClass">
                            </telerik:RadComboBox
                        </div>                                         
                       <div style="margin: 0px; float: right;"></div>                                                                                                                                                                                           
                       <div style="margin: 0px; padding: 0px; float: left; margin-right: 10px; white-space: nowrap;">
                            <asp:Button ID="Button1" runat="server" OnClientClick="changePage1('first'); return false;"
                                CommandName="Page" CommandArgument="First" CssClass="PagerButton FirstPage" />
                            <asp:Button ID="Button2" runat="server" OnClientClick="changePage1('prev'); return false;"
                                CommandName="Page" CommandArgument="Prev" CssClass="PagerButton PrevPage" />
                            <span style="vertical-align: middle;font-size:8pt;">Page:</span>
                            <telerik:RadNumericTextBox ID="RadNumericTextBox1" Skin="Office2007" Width="25px" Font-Size="8pt"
                                Value='<%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %>'
                                runat="server" EnabledStyle-HorizontalAlign="Center" >
                                <ClientEvents OnValueChanged="RadNumericTextBox1_ValueChanged1" />
                                <NumberFormat DecimalDigits="0" />
                            </telerik:RadNumericTextBox>
                            <span style="vertical-align: middle;font-size:8pt;">of
                                <%# DataBinder.Eval(Container, "Paging.PageCount")%>
                            </span>
                            <asp:Button ID="Button3" runat="server" OnClientClick="changePage1('next'); return false;"
                                CommandName="Page" CommandArgument="Next" CssClass="PagerButton NextPage" />
                            <asp:Button ID="Button4" runat="server" OnClientClick="changePage1('last'); return false;"
                                CommandName="Page" CommandArgument="Last" CssClass="PagerButton LastPage" />                                                                                                      
                       </div>  
                       <asp:Panel runat="server" ID="NumericPagerPlaceHolder"/>                                                                                                                                                                                                                   
                    </asp:Panel>
                </PagerTemplate>
            </MasterTableView>
            <HeaderStyle Font-Size="8pt" />                                                                               
        </telerik:RadGrid>
In the ItemCreated event function i have created the Numericpager.  Following code describe that functionality. I also attached a screen shot about that pager.  Now i come to my problem,  I want to handle the click events of that Pager. When i click the page numbers(1 2 3 4) i want to do some process. How can i handle this events from client side using javascript and from server side using C#
void radgdSuccessionList_ItemCreated(object sender, GridItemEventArgs e)
        {
            try
            {
                 
                    if (e.Item is GridPagerItem)
                    {
                        GridPagerItem gridPager = e.Item as GridPagerItem;
                        Control NumericPagerPlaceHolder = gridPager.GetNumericPager();
                         
                        Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
                        placeHolder.Controls.Add(NumericPagerPlaceHolder);
                    }
                    
                 
            }
            catch (Exception)
            { }
        }

Please give me the solution  for this problem.

Thanks,
Velkumar.
Iana Tsolova
Telerik team
 answered on 19 Apr 2011
1 answer
93 views
I'm playing around with the Q1 2011 Rad menu.

I'm able to easily style a static menu without problems, however, now I'm looking at a radmenu bound to an SQLDataSource. I've gone through several example (however have not tried adding C# code yet).

Can someone point me in the direction to successfully styling and configuring the radmenu items in this scenario (i.e. hover over background image, normal background image, etc)

Thanks!
Peter
Telerik team
 answered on 19 Apr 2011
1 answer
209 views
I want to use a stylesheet on a page that contains a RAD Editor control.  I do *not* want RAD Editor to take that stylesheet link and add it to the content iframe.  Seems like it should be simple to do, but nothing seems to work.  Here's my code:

<telerik:RadEditor ID="edtMe" runat="server" Skin="WebBlue" Height="600px" Width="100%"
    OnClientLoad="OnClientLoad"
    ContentFilters="RemoveScripts, FixUlBoldItalic, FixEnclosingP, IECleanAnchors, MozEmStrong, ConvertToXhtml, IndentHTMLContent"
    StripFormattingOptions="MSWordRemoveAll" OnClientPasteHtml="OnClientPasteHtml" SpellCheckSettings-AllowAddCustom="false">
    <CssFiles>
        <telerik:EditorCssFile Value="~/CSS/blank.css" />
    </CssFiles>
    <Content>
    </Content>
</telerik:RadEditor>


Using the CssFiles is the correct way to make this happen, right?  Not only are the page styles still being linked in the content iframe, but blank.css is *not* being included.  The content area iframe's head element looks like this:

<head>
    <style></style>
    <link href="/MvApp/WebResource.axd?d=ZMA9Nyl6OV-krKpF_AxH2ehr5-QYUrzahQKPDXQJIRbD47XVXXyGnhGGRWxBtFdN4Rbj-vRYXe6815fiQCJqONv8yYpz-mHqbT_xLF5uFGZiBNGg4prjb2HEQSOTlJ3QqpKfVUx83-JpV7QlzOL4nw2&t=634203434222846081" type="text/css" id="RADEDITORSTYLESHEET0" rel="stylesheet">
    <link href="./CSS/Styles.css" type="text/css" id="RADEDITORSTYLESHEET1" rel="stylesheet">
    <link href="App_Themes/Basic/MainMaster.css" type="text/css" id="RADEDITORSTYLESHEET2" rel="stylesheet">
    <link href="App_Themes/Basic/Menu.css" type="text/css" id="RADEDITORSTYLESHEET3" rel="stylesheet">
</head>

You'll notice that blank.css isn't there and Styles.css (the stylesheet I want on the page but not in the content), is.  Any thoughts?

I'm using RAD controls v2010.1.519.35.
Rumen
Telerik team
 answered on 19 Apr 2011
2 answers
124 views
Hi,

I cannot localize such undo\redo actions like "Enter", "Insert HTML", "Resize", "Set HTML", "Move". 
I have tried to define these keys in localization file (RadEditor.Tools.*.resx) but with no luck. Clearing browser cache and restarting application didn't help.
At the same time if I change any values from defined keys changes are shown in the editor.

Please help.
Sergey
Top achievements
Rank 1
 answered on 19 Apr 2011
1 answer
138 views
I have a screen with a slider area that shows an SSRS report and I don't want the report or the entire report viewer to use the form decorator code as it is messing up the report.  Please help asap.

 

 

 

 

<%@ Page Language="C#" AutoEventWireup="True" Inherits="HotelIQ.Report.AnalysisViewer"
    CodeBehind="AnalysisViewer.aspx.cs" %>
  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head id="Head1" runat="server"/>
<body id="body" runat="server" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"
    style="background-color: #333333">
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheet1" />
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="All"/>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="99%" Width="100%">
        <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="None">
            <div id="Zone1" runat="server">
                <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22" DockedPaneId="rspParameters">
                    <telerik:RadSlidingPane ID="rspParameters" Title="Parameters" runat="server" Width="400"
                        Height="100%">
                         <telerik:RadMenu ID="rmReport" runat="server" Width="100%" OnItemClick="rmReport_ItemClick">
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="Parameters">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Save">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Clear">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="View Analysis">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="About">
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                        <table style="font-family: Tahoma; font-size: 10px" width="100%">
                            <tr>
                                <td colspan="2">
                                    <asp:RadioButtonList ID="rblHotelPortfolio" runat="server" RepeatDirection="Horizontal"
                                        AutoPostBack="True" Font-Size="10" Width="100%" OnSelectedIndexChanged="rblHotelPortfolio_SelectedIndexChanged">
                                        <asp:ListItem Text="Hotel" Selected="True" Value="Hotel">
                                        </asp:ListItem>
                                        <asp:ListItem Text="Portfolio" Value="Portfolio">
                                        </asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="lblHotelPortBrand" AssociatedControlID="wcHotelPortBrand"
                                        Text="Hotel/Portfolio" /> 
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="wcHotelPortBrand"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <telerik:RadComboBox ID="wcHotelPortBrand" runat="server" DataSourceID="sdsHotel"
                                        DataTextField="Selection_Nm" DataValueField="Selection_Id">
                                    </telerik:RadComboBox>
                                </td>
                            </tr>
                             <tr>
                                <td colspan="2">
                                    <hr />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="Label10" AssociatedControlID="txtStartDate">Start Date</asp:Label>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtStartDate"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <asp:Label runat="server" ID="Label11" AssociatedControlID="txtEndDate">End Date</asp:Label>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEndDate"
                                        ErrorMessage="Required" CssClass="text">Required</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                            <td>
                                                <telerik:RadDatePicker ID="txtStartDate" MinDate="2009/1/1" runat="server" OnSelectedDateChanged="txtStartDate_TextChanged"
                                                    AutoPostBack="true">
                                                </telerik:RadDatePicker>
                                            </td>
                                <td>
                                    <telerik:RadDatePicker ID="txtEndDate" MinDate="2009/1/1" runat="server">
                                    </telerik:RadDatePicker>
                                </td>
                            </tr>
                        </table>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </div>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitbar1" runat="server" SkinID="Black">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="ReportPane" runat="server">
                <rsweb:ReportViewer ID="rptViewer" runat="server" ShowPrintButton="true" Height="99%"
                    Width="100%" ShowRefreshButton="False" ShowParameterPrompts="false" AsyncRendering="True"
                    DocumentMapCollapsed="True" Enabled="True" ExportContentDisposition="AlwaysAttachment">
                </rsweb:ReportViewer>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

 

Georgi Tunev
Telerik team
 answered on 19 Apr 2011
4 answers
195 views
Hi all,
How can i change the default datepicker to just month picker and year picker?
And how can i fixed the picker that user are unable to click on FastNavigationStep and Navigationstep?

Thank you.
regards,
nasri
Arteta Sam
Top achievements
Rank 1
 answered on 19 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?