Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
545 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
197 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
136 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
113 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
139 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
1 answer
110 views
I have the RadAutoCompleteBox on my page and next to it is a an ASP button.

<asp:Button ID="LoadReportButton" runat="server" Text="Load Report" OnClick="LoadReportButton_Click" />


Is there any way when a user selects a value on the drop down and creates a token all they have to do is press enter on the keyboard instead of pressing tab then enter.

I have it so far when you select an item it fires the function, entry added and displays a pop up saying what you have selected.
<script type="text/javascript">
    function entryAdded(sender, eventArgs)
    {
        alert("An item with Text='" + eventArgs.get_entry().get_text() + "' has just been selected.");
    }

I just need a piece of code that highlights the button or even fires the button automatically which would be cool.

Cheers

John Moore
Kalina
Telerik team
 answered on 23 Oct 2012
1 answer
239 views
Hi,

I've been searching about this for several days but I can't get my head around it.

Just as a note: all of our custom skins were designed using the visual style builder (http://stylebuilder.telerik.com/) but none of them has a .skin file. I couldn't understand yet what is this file for.

I have an application that each user will have a different CUSTOM skin name saved on the database. There will be the same number of users as skins, so if there's 50 users, there will be 50 different skins, one to each user. Everytime the user logs in, the application loads the skin name from the database and applies it to all controls by using a technic described on this blogpost: http://blogs.telerik.com/vladimirenchev/posts/08-07-11/change-skins-dynamically-for-all-telerik-radcontrols.aspx

I converted the C# code into VB and put on the page load of the master page. It looks like this

     Public Sub SetSkin(ByVal target As Control, ByVal skinName As String)
         
        If TypeOf target Is ISkinnableControl Then
 
            Dim skinnableTarget As ISkinnableControl = Nothing
            skinnableTarget = DirectCast(target, ISkinnableControl)
            skinnableTarget.Skin = skinName
 
        Else
 
            For Each child As Control In target.Controls
                SetSkin(child, skinName)
            Next
 
        End If
    End Sub

This works great and as intended when the users are 2 or 3, but when it grows to 20 or 30 users and skins I can see in the source code that all CSS files of all skins are loaded into the page and this creates problems with the IE limitation on number of css includes which I think is 32. I read somewhere that telerik will include all css files inside the theme folder. For example, each Skin have 11 different css files (ajax, button, calendar, grid, etc). If I have 20 different skins I'll have 220 css files included in the page when I need onlye 11.

I also don't know if I should have 1 theme with 1 skin per user
Example
App_Themes\ThemeUser1\SkinYellow
App_Themes\ThemeUser2\SkinGreen
and then programmatically assigned a different theme after each user. This would solve the problem of  to many css files included in the page, but i couldn't find out to assign theme's to the page/controls

or if I should have 1 theme with several skins but find a way to include only the css files of the skin that is gonna be used by the logged user.
Eexample
App_Themes\GenericTheme\SkinYellow
App_Themes\GenericTheme\SkinGreen

Hope this makes sense, please let me know what I should do to solve this problem. Oh, and sorry for such a long post, that's the way I found best to explain the issue.

Regards
Joao
Galin
Telerik team
 answered on 23 Oct 2012
1 answer
121 views
 When I check the 'chkSelectAll' checkbox , the checkboxes in the entire column are not all checked.  Please help. 


<telerik:RadGrid ID="grd" runat="server" OnLoad="grd_OnLoad" OnNeedDataSource="grd_NeedDataSource"
                                    SkinID="CR" GridLines="None" AllowPaging="True"  AutoGenerateColumns="False" OnItemDataBound="grd_ItemDataBound"
                                    AllowMultiRowSelection="true" Width="925px">
                                    <MasterTableView  PageSize="10" EnableNoRecordsTemplate="true"
                                        DataKeyNames="AssetID">
                                        <NoRecordsTemplate>
                                            <div style="text-align: left; width: 100%">
                                                <asp:Label ID="lblEmptyMsg" runat="server" meta:resourcekey="lblEmptyMsgres"></asp:Label></div>
                                        </NoRecordsTemplate>
                                    </MasterTableView>
                                    <PagerStyle AlwaysVisible="True" />
                                    <ClientSettings EnableRowHoverStyle="true">
                                        <Selecting AllowRowSelect="True" />
                                        <Scrolling AllowScroll="True"></Scrolling>
                                        <ClientEvents OnGridCreated="GridCreated" />
                                         <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
                                    </ClientSettings>
                                </telerik:RadGrid>
Tsvetoslav
Telerik team
 answered on 23 Oct 2012
8 answers
367 views
I'm using the latest Q1 2011 ASP.NET Ajax.

when adding the Radscriptmanager to my masterpage I can set the following : 
EnableCdn="true"

 

 

However this sets the microsoft scripts to be loaded from: ajax.microsoft.com
This is an obsolete path and should be replaced with the cookie free alternative: ajax.aspnetcdn.com
as referenced on: http://www.asp.net/ajaxlibrary/cdn.ashx

I have found that I manually can do this with the following code:

<

 

 

telerik:RadScriptManager ID="sm1" runat="server" EnablePartialRendering="true" EnableCdn

="true">

 

<Scripts>

<asp:ScriptReference Assembly

="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

Name="MicrosoftAjax.js" Path="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"

/>

 

</Scripts

>

 

</telerik:RadScriptManager>

 

 

 


However it is a rather annoying that I have to add references to all the Microsoft scripts manually.
My questions are as follows:

1) Is the way I'm manually refering to ajax.aspnetcdn.com scripts the best/only way to do this?
2) Will Telerik change the path to ajax.aspnetcdn.com from ajax.microsoft.com in later release?

best regards
Thomas
Dimitar Terziev
Telerik team
 answered on 23 Oct 2012
2 answers
331 views
I have a radcombobox with checkboxes and Multiple values in the drop-down, when I check  values in the radcombobox , OnitemChecked server side event is called and based on the values checked data shows up on the page.

But when I checked Select All for Checkboxes, no event is called. Could someone please suggest  me which event is related to the Select All Checkboxes feature
<telerik:RadComboBox ID="uxRCBCustomerName" runat="server" Width="200px" EnableCheckAllItemsCheckBox="true"
            DropDownWidth="500px"  height="120px" DataTextField="HPDCustomerName" DataValueField="HPDCustomerID"  AllowCustomText="true" CheckBoxes="true"  DataKeyField="employerGroupID" EmptyMessage="No Promo Found" AutoPostBack="true" CheckedItemsTexts="DisplayAllInInput"   AppendDataBoundItems="true" OnItemChecked="uxRCBCustomerName_ItemChecked"   EnableViewState="true" MarkFirstMatch="true" CausesValidation="false" >
           <ItemTemplate>
                              
                               <ul
                   <li class="col1" >
                   <%# DataBinder.Eval(Container, "Text")%>
                    </li>
                      <li class="col2">         
                       <%# If(DataBinder.Eval(Container.DataItem, "hasJOnly"), "J", "")%><%# If(DataBinder.Eval(Container.DataItem, "hasJM"), "JM", "")%><%# If(DataBinder.Eval(Container.DataItem, "hasJOnly")=False and DataBinder.Eval(Container.DataItem, "hasJM")=false, "N/A", "")%></td>
                                           
                   </li>  
                   </ul>
                                     
                 
           </ItemTemplate>
       </telerik:RadComboBox>

I am looking for a server side event. Please see my code above for radcombobox.

Thanks,
Ruby
Top achievements
Rank 1
 answered on 23 Oct 2012
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
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
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?