Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
208 views
Is there a way to export the scheduler into a landscape mode so it fits the entire PDF width? I tried setting the PDF PageHeight and PageWidth to be in landscape, but it ended up only filling half the page width. If I'm missing something, please let me know.

Here is a link to a screenshot of what I got.

http://screencast.com/t/jlBAEf4Nm50

Thanks,
Adam
Bozhidar
Telerik team
 answered on 24 Oct 2012
1 answer
150 views
Hello,

I'm working with the asp.net RadChart, trying to more finely tune the displayed labels associated with a chart.

Specifically, I'd like to start the axis labels and ticks at a point not at the start of the data, or at 0. In the attached files, I have my current chart's axis (with RadChart) where the labels start at the minValue and end with the maxValue of the Axis.

Target.png represents what I'd like to see in the chart, with the label starting at a pre-defined point in the data. In this case, I'd like to start my labeling at July 1, 2010 instead of April 28, 2010 in the dataset.

Is there an easy way to do this?


Thanks,
Alex Bucevicius
Petar Marchev
Telerik team
 answered on 24 Oct 2012
5 answers
186 views
I need to change the maxlength clientside in a RadTextBox depending on a selection in a combobox.  I tried this:

 

var txt = $find("<%= txtValue.ClientID %>");

 

 

var item = eventArgs.get_item();

 

 

var value = item.get_value();

 

 

switch(value)

 

{

 

case "CUST_NU":

 

txt.MaxLength = 8;

 

break;

 

 

case "NAME":

 

txt.MaxLength = 30;

 

break;

 

 

case "CIC":

 

txt.MaxLength = 4;

 

break;

 

 

case "INVOICE_NU":

 

txt.MaxLength = 10;

 

break;

 

}

Then checked for the maxlength via alert(txt.MaxLength) and it shows the new maxlength value but the textbox still doesn't change to the new length.

Heinrich
Top achievements
Rank 1
 answered on 24 Oct 2012
2 answers
57 views

onclientRequestSuccess does not seem to have the updated firstDayStart().  I thought I had figured it out, but its not working:

As I navigate in the calendar, changing months, it does not reflect the right day - what am I doing wrong?

function onClientRequestSuccess(scheduler, eventArgs) {
    if (typeof loadList == 'function') {
        var start = scheduler.get_firstDayStart();
        var end = start;
        var curView = scheduler.get_selectedView();
        if (curView == 0) {  // day view
            end.setHours(start.getHours() + 24);
        } else if (curView == 1) {  // week view
            end.setHours(start.getHours() + (24 * 7));
        } else if (curView == 2) {  // week view
            end.setMonth(start.getMonth() + 1);
            // need to find out if we are on a Saturday..  If not, we need to add days until we get there
        }
        alert(start + " **- " + end);
        loadList(start.getTime(), end);
    }
}
Boyan Dimitrov
Telerik team
 answered on 24 Oct 2012
3 answers
94 views
Hi All,

I created a button in a radgrid with below code. When I try to reach the value in columns that is okay. I can make it.

But I try to make a request with these parameters on my web service. I get this error "property of value is null or undefined" at runtime.

Now I am thinking I create these buttons dynamically. Is that the reason I cant make a request?

Please help.

protected void rgGeneralSearch_ItemDataBound(object sender, GridItemEventArgs e)<br>        {<br><br>            if (e.Item is GridDataItem)<br>            {<br>                GridDataItem gridDataItem = (GridDataItem)e.Item;<br>                Button btnAdd =<br>                    (Button)gridDataItem["Add"].FindControl("btnAdd");<br>                RadNumericTextBox txtQuantity =<br>                    (RadNumericTextBox)gridDataItem["Quantity"].FindControl("txtQuantity");<br><br><br>                //btnAdd.Attributes["onclick"] = "btnAddClick('" + txtQuantity.ClientID + ", "+ rgGeneralSearch.MasterTableView.GetColumn("Code") + "')";<br>                btnAdd.Attributes["onclick"] = "btnAddClick('" + txtQuantity.ClientID + "', '"+ e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Code"] +"')";<br>                //btnAdd.Attributes["href"] = "#";<br>                btnAdd.Attributes.Add("ajax", "");<br>            }<br>        }


function btnAddClick(Quantity, Code) {<br>    alert($get(Quantity).value);<br>    alert(Code);<br><br>    var SenderType = 1;<br>    var SenderId = 22;<br>    var ProductId = 333;<br>    var CustomerId = 99;<br>    var SalesmanId = 88;<br>    var DiscSpecial = 23;<br>    var TerminalNumber = 234;<br><br>    var webMethod = "http://localhost:5261/WS/Basket_WS.asmx/InsertBasket";     <br>    var parameters = "{'SenderType':'" + SenderType + "', 'SenderId':'" + SenderId + "', 'ProductId':'" + ProductId + "', 'CustomerId':'" + CustomerId + "', 'SalesmanId':'" + SalesmanId + "', 'Quantity':'" + 22 + "','DiscSpecial':'" + DiscSpecial + "','TerminalNumber':'" + TerminalNumber + "'}";   <br>    $.ajax({<br>        type: "GET",<br>        url: webMethod,<br>        data: parameters,<br>        contentType: "application/json; charset=utf-8",<br>        dataType: "json",<br>        success: OnGetSuccess,<br>        error: OnGetError<br>    });<br>}
Radoslav
Telerik team
 answered on 24 Oct 2012
6 answers
527 views
I am using master pages in my asp.net web app. I receive this error:

The control with ID 'RadScriptManager1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.


I've tried just about every combination of where to put this tag and nothing works. What do I need to add to the master page and what do I add to the pages inherited from the master page? And most importantly WHERE to place the tag?
<asp:ScriptManager ID="ScriptManager1" runat="server" />
Jorge irving
Top achievements
Rank 1
 answered on 23 Oct 2012
2 answers
195 views

Hi folks

Can anybody point me in the right direction, please? I have an ASP.NET content page that loads a master page, and I need each to be linked to their own separate external javascript files. If I use the RadScriptManager on the content page (as I have already been doing successfully for existing content page code), it doesn't load the external javascript file from the master page. Therefore I decided I needed to include the RadScriptManager in the master page, and link to it from the content page with a standard ScriptManagerProxy control. The problem is: the content page won't load with the ASP.NET code I am trying to use, with the RadScriptManager in the master page, and the ScriptManagerProxy in the content page. I just get:

The control with ID 'ScriptManagerProxy1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

That error reads to me as though the proxy control can't find the RadScriptManager in the master page, or doesn't recognize it as a replacement for the standard ASP ScriptManager.

Could anyone clarify, is this configuration I am trying to use actually supported? If so, where exactly in the markup of the two pages should the RadScriptManager and ScriptManagerProxy declarations go? Or do they need to be added programatically for this to work? If someone could point me to a working example, that would be great - the RadControls documentation just says, 'Yes it works', but I can't find an example anywhere.

Regards

 

 

Jorge irving
Top achievements
Rank 1
 answered on 23 Oct 2012
2 answers
122 views
The situation is as follows:
I'm trying to dynamically create RadButtons (type = option button) in an ASP:GridView.  (maybe this should be in a RadGrid, but that's another conversation for another time)

What I did was dynamically add the RadButton on a button.click method as follows:

Dim dupOptionTop As RadButton = New RadButton()
dupOptionTop.GroupName = dgr.Cells(lnColumn).Text
dupOptionTop.ID = dupFile.FILEID
dupOptionTop.AutoPostBack = False
dupOptionTop.ButtonType = RadButtonType.ToggleButton
dupOptionTop.ToggleType = ButtonToggleType.Radio
dupOptionTop.ForeColor = Color.Brown
 
Dim dupOption As RadButtonToggleState = New RadButtonToggleState()
dupOptionTop.Text = dupFile.FILEID
dupOptionTop.ToggleStates.Add(dupOption)
dupOptionTop.ToggleStates.Add(dupOption)
dgr.Cells(lnMsgColumn + 1).Controls.Add(dupOptionTop)

I figure that the user could select from 2 or more choices, then iterate through the controls collection of a GridView cell to find which choice they selected and move on.

Unfortunately, while the new controls are on the users screen, they are unavailable for use in the code-behind.  I'm now well aware that the code-behind can't see dynamically created controls unless they are set up in the Page_Init file.  The problem is that it needs to have the data from the GridView loaded in order to create the controls, and that data won't load until AFTER the Page_Init event.

So I was thinking perhaps I can use the ViewState as follows in the Page_Load, and then use those to repopulate the GridView with the RadButtons:

Dim _options = New List(Of RadButton)
ViewState.Add("options", _options)

And then I run into this problem:
Type 'Telerik.Web.UI.RadButton' in Assembly 'Telerik.Web.UI, Version=2012.1.411.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.
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.Runtime.Serialization.SerializationException: Type 'Telerik.Web.UI.RadButton' in Assembly 'Telerik.Web.UI, Version=2012.1.411.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Is there any way to get around this issue, or is there perhaps a much better way to accomplish this goal?

Thanks for any help you may have.
Patrick
Top achievements
Rank 1
 answered on 23 Oct 2012
6 answers
107 views
I receive the following error when i try to activate the RadGrid Feature

Error

Failed to instantiate file "TelerikSPRadGridWebPart.dwp" from module "TelerikSPRadGridWebPart": Source path "Features\RadGridFeature\RadGridSharePoint\TelerikSPRadGridWebPart\TelerikSPRadGridWebPart.dwp" not found.
Jeff
Top achievements
Rank 1
 answered on 23 Oct 2012
15 answers
132 views
Hi! yesterday i had an app with many radcharts inside it (around 11) and it worked fine. Today i charged new values into my Db and it crashed showing the next error:

StackedLine series must have equal items count


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: Telerik.Charting.ChartException: StackedLine series must have equal items count

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


How can i solve this? I've already changed it to line and it shows the same error (it's strange because if i have line charts why the error is stackedline? )
Arturo
Top achievements
Rank 1
 answered on 23 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?