Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
468 views
Hi.

I´ve been looking for a solution to my problem for 2 days with no success, I hope anyone can hlep me.


I´m migrating the Telerik Controls 2006 to Q1 2009.

I´ve got to have a scriptmanager in mainpage.aspx, no it´s not a masterpage, why? I don´t know. It wasn´t me that did the apllication i´m just working on the migration.
Has I was saying I´ve got to have a scriptmanager because I have a RadAjaxPanel in the page and also because I have a asmx to lead with.

I load dynamically usercontrols on pageload of the mainpage.aspx.

When I tried to change a radtab from telerik 2006 to Q1 2009, things go well if I had to my usercontrol client-side a scriptmanager.

But since I´ve got already one in mainpage.aspx I got that error that everybody knows "Can only have one scriptmanager per page".

I take the scriptmanager from usercontrol and the error stops but if I click on the radtab it doesn´t fire the event buttonckick has expected.

What am I missing????

Here goes my client-code of mainpage.aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="main_page1.aspx.vb" Inherits="NewsletterNet.Main_page1"
    ValidateRequest="false" SmartNavigation="False" %>
<%@ Register TagPrefix="ahc" Namespace="Altinoren.HTMLControls" Assembly="Project_ShowHideButton" %>
<%@ Register TagPrefix="abw" Namespace="Altinoren.HTMLControls.BrowserWindow" Assembly="Project_BrowserWindow" %>
<%@ Register TagPrefix="eeekSoft" Namespace="EeekSoft.Web" Assembly="Project_EeekSoft.Web.PopupWin" %>
<%@ Register TagPrefix="internal" TagName="PageHeader" Src="~/UserControls/PageHeader.ascx" %>
<%@ Register TagPrefix="internal" TagName="MainMenu" Src="~/UserControls/MainMenu.ascx" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadWindow.Net2" %>
<%--<%@ Register TagPrefix="internal" TagName="SideBar" Src="~/UserControls/SideBar.ascx" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head runat="server">
<telerik2009:RadCodeBlock ID="RadCodeBlock1" runat ="server" >
    <title>
        <%=app_title%>
    </title>
    <meta content="<%= app_email %>" name="Title">
    <meta content="<%= app_keywords %>" name="Keywords">
    <meta content="<%= app_email %>" name="Description">
    <meta content="<%= app_email %>" name="OWNER">
    <meta content="Microsoft Visual Studio.NET 7.1" name="GENERATOR">
    <meta content="Visual Basic 7.1" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

    <script src="public/js/jquery-1.3.1.js" type="text/javascript"></script>

    <script src="public/js/jquery-ui-1.6rc6.js" type="text/javascript"></script>

    <link href="public/css/ui.all.css" type="text/css" rel="stylesheet">
    <link href="service/Styles/UserCalendar.css" type="text/css" rel="stylesheet">
    </telerik2009:RadCodeBlock>
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
    <form id="Form1" method="post" runat="server">
    <asp:ScriptManager id="scriptManager" runat="server">
        <Services>
            <asp:ServiceReference path="~/UserControls/Scheduler/SchedulerScriptService.asmx" />
        </Services>
    </asp:ScriptManager>

     <telerik:RadWindowManager ID="Singleton"  VisibleOnPageLoad="true" SkinID="Default"
        runat="server" EnableViewState="False">
        <Windows>
            <telerik:RadWindow ID="Splash" Splash="true" runat="server" />
        </Windows>
    </telerik:RadWindowManager>
   
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td>
            <internal:PageHeader ID="PageHeader" runat="server" />&nbsp;
        </td>
      </tr>
      <tr>           
        <td >
            <div style="float: right; display: none;">
                <p>
                    <asp:HyperLink ID="hl_DemoVersion" runat="server" EnableViewState="False" ImageUrl="service/res/bt_DemoVersion.jpg" />
                    <asp:HyperLink ID="hl_scheduler" runat="server" ImageUrl="service/res/bt_scheduler.jpg" />
                    <asp:HyperLink ID="hl_page_ICON" runat="server" EnableViewState="False" ImageUrl="service/res/bt_home.jpg" />
                </p>
            </div>
        </td>
      </tr>
      <tr>
        <td>
       
            <div class="Authentication">
               
                    <asp:HyperLink ID="hl_user_label" runat="server" Font-Size="10px" ForeColor="White">Welcome </asp:HyperLink>
                    <asp:HyperLink ID="hl_user_name" runat="server" Font-Size="10px" ForeColor="White"
                        Font-Bold="True">Admin</asp:HyperLink>
                    <asp:Label ID="lbPemissions" runat="server" Font-Size="10px" ForeColor="#FFFF80"></asp:Label>
               
            </div>
        </td>         
      </tr>
      <tr>
        <td>
            <div class="Toolbar">
                <internal:MainMenu ID="mainMenu" runat="server" EnableViewState="false" />
            </div>
        </td>
      </tr>
      <tr>
        <td>
            <telerik2009:RadAjaxPanel ID="PanelHelp" runat="server" EnableOutsideScripts="True" Width="100%" Visible="false">
                <div class="MainLeftHeader">
                    <asp:Label ID="lbmenu_label" runat="server" CssClass="SectionTitle" Text="Menu" />
                </div>
                <div class="MainRightHeader" style="display:none;">
                    <table id="Table4" cellspacing="0" cellpadding="0" width="100%" height="100%">
                        <tr>
                            <td valign="bottom">
                                <asp:PlaceHolder ID="PlaceholderMyOffice" runat="server" Visible="False" EnableViewState="False" />
                            </td>
                            <td align="right" valign="middle">
                                <asp:Label ID="lbScheduler_label" runat="server"></asp:Label>
                                <asp:Button ID="ShowHideButtonHelp" runat="server" Font-Size="11px" ForeColor="Navy"
                                    Font-Bold="True" Text="Show Help" />
                                <abw:BWImageButton ID="BWImageButtonHelp" runat="server" SkinID="HelpIcon_32" NavigateUrl="login.aspx"/>
               
                            </td>
                        </tr>
                        <tr>
                            <td valign="bottom" colspan="2">
                                <asp:Label ID="lbHelp" runat="server" Visible="False" Font-Size="12px" ForeColor="#404040">This is my Help</asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
            </telerik2009:RadAjaxPanel>
        </td>
      </tr>
    </table>
   
     
   
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr >
            <td class="MainLeftColumn" colspan="200">
               
              
                <asp:Panel ID="PanelQuickInfo" SkinID="PanelQuickInfo" runat="server" style="width: 100%;">
                    <div class="PanelQuickInfoTitle">
                        <asp:Image ID="hl_messaging_icon" runat="server" SkinID="InformationIcon"/>
                        <asp:HyperLink ID="hl_messaging_label" runat="server" EnableViewState="False" Text="&nbsp;Quick Info" />
                    </div>
                    <div class="PanelQuickInfoAlternateRow">
                        <asp:Image ID="Image1" runat="server" SkinID="SubscriberIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hlSubscribers" runat="server" EnableViewState="False" Text="100 users in 8 mailing lists" />
                    </div>
                    <div class="PanelQuickInfoRow">
                        <asp:Image ID="Image5" runat="server" SkinID="CheckmarkIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hlPneding" runat="server" EnableViewState="False" Text="100 users in 8 mailing lists" />
                    </div>
                    <div class="PanelQuickInfoAlternateRow">
                        <asp:Image ID="Image2" runat="server" SkinID="UserIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hlMailinglists" runat="server" EnableViewState="False" Text="1 mailing list" />
                    </div>
                    <div class="PanelQuickInfoRow">
                        <asp:Image ID="Image4" runat="server" SkinID="CampaignsIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hlCampaigns" runat="server" EnableViewState="False" Text="10 Newsletters / 1 sent" />
                    </div>
                    <div class="PanelQuickInfoAlternateRow">
                        <asp:Image ID="Image3" runat="server" SkinID="NewsletterIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hlNewsletters" runat="server" EnableViewState="False" Text="10 Newsletters / 1 sent" />
                    </div>
                    <div class="PanelQuickInfoRow">
                        <asp:Image ID="Image6" runat="server" SkinID="QueueIcon" EnableViewState="False" />
                        <asp:HyperLink ID="hl_Queue" runat="server" EnableViewState="False" Text="10 Newsletters / 1 sent" />
                    </div>
                    <div class="PanelQuickInfoAlternateRow">
                        <asp:Image ID="Image7" runat="server" SkinID="DatabaseIcon" EnableViewState="False" />
                        <asp:HyperLink ID="Hyperlink1" runat="server" EnableViewState="False" Text="DB type:" />
                        <asp:HyperLink ID="hlDBType" runat="server" EnableViewState="False" Text="Sql Server" />
                    </div>
                </asp:Panel>
               
                <br />
                <br />
            </td>
            <td class="MainCenterColumn">
                <asp:Image ID="imSpcerColmn" runat="server" SkinID="Spacer" EnableViewState="False" />
            </td>
            <td class="MainRightColumn">
              
                    <asp:PlaceHolder ID="PlaceholderExtra" runat="server" Visible="False" />
                    <asp:PlaceHolder ID="PlaceHolder1" runat="server"/>
                    <a name="Pbottom">&nbsp;</a>
              
            </td>
        </tr>
    </table>
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr>
            <td>
                <div class="Footer">
                    <asp:HyperLink ID="hl_copyright" runat="server" SkinID="Footer" NavigateUrl="http://www.agap2.com"
                        Text="AGAP2 Consulting" />

                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
<eeekSoft:PopupWin ID="PopupWin1" runat="server" Visible="False" Height="100px" DockMode="BottomRight"
    Style="width: 253px" />


server-code mainpage.aspx

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Try

            'Testes AINACIO
            'Response.Write("-->" & SessionVars.AdminSelectedCompanie)

            'Expiretion set in minutes
            'Response.Expires = 300 '3 hours
            'Try

            ApplyAppPersonalization()

            DebugMsg("")
            DebugMsg("::Main_page1 Loading ------------------------------/n")
            DebugMsg("::Main_page1 Reloading Postback:: " & Page.IsPostBack & "/n")
            DebugMsg("::Main_page1 Reloading RawUrl:: " & Request.RawUrl & "/n")

            'Initialize Database
            InitDB()
            SetMetaVars()

            'Init User Language Messages
            InitUserLanguage()

            'Init Encryption Key
            InitEncryptionKey()

            'User Authentication
            AuthenticateUser()

            'Set toolbar size
            SetToolbarSize()
            hl_DemoVersion.Visible = Not normalExec

            DebugMsg("::Demo mode is set to :: " & Not normalExec)

            Dim pn As New Assem
            hl_copyright.Text = app_copyright_link & " Version: " & pn.VersionMajor & "." & pn.VersionMinor & " Build: " & pn.VersionBuild

            'PlaceHolder Extra Implementation
            If Not Page.IsPostBack Then
                'If Request.QueryString("PlaceholderExtraVisible") = "true" Then
                '    Dim myControl As UserCalendar = Session(_myOfficeCalendar)
                '    PlaceholderExtra.Controls.Add(myControl)
                '    PlaceholderExtra.Visible = True
                'Else
                PlaceholderExtra.Visible = False
            End If
            'End If

            'Select The controls to plage in the page
            ApplyControls()

            'Show MyOfficeToolbar
            InitMyOfficeToolBar()

            ' Check scheduler status
            InitSchedulerMonitoring()

            'application specific items show or hide
            ApllicationSpecificSettings()

            'Set Help
            SetHelp()

            DebugMsg("::User is _user_admin :: " & Session(_user_admin))
            DebugMsg("::User is _user_superuser :: " & Session(_user_superuser))

            If Not normalExec Then
                'save web analytics
                Dim urlid As Integer = 0
                Try
                    urlid = Convert.ToInt32(Request.QueryString("url_id"))
                Catch ex As Exception

                End Try

                Dim st As Stats = New Stats(Session(_admin_Id), 0, Request.QueryString("Action"), Request.QueryString("Control"), urlid)
                Dim ddl As String = st.GetDdlInsert(ConvertSessionTodbType())
                Dim rowsAffected As Integer = cbo_ExecNonQuery(Session(_Conn_string), ddl)
            End If

            DebugMsg("::Main_page1 Loaded ------------------------------")
            DebugMsg("")
            'Catch ex As Exception
            '    DebugMsg("GENERAL ERROR:Exception" & ex.Message)
            '    Response.Redirect("Main_page1.aspx")
            'End Try

        Catch ex As Exception
            Response.Write("Exception::" & ex.Message & "<br>")
            Response.Write("StackTrace ::" & ex.StackTrace)
        End Try

    End Sub


Public Sub ApplyControls(Optional ByVal manuallyCalled As Boolean = False)
        Dim action As String = Request.QueryString("Action")
        Dim act_param As String = Request.QueryString("url_id")
        Dim Qcontrol As String = Request.QueryString("Control")

        Dim xmlConfigFileName As String = HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath + disCore.Web.FrontEnd.WebPageBase.FrontEndConfigFile)
        Dim ap As disCore.Web.FrontEnd.ApplicationProvider = New disCore.Web.FrontEnd.ApplicationProvider(xmlConfigFileName, False)
        Dim currentDomain As String = HttpContext.Current.Request.ServerVariables("SERVER_NAME").ToLower
        Dim configFileName As String = ap.ApplicationSettings.GetConfigFielName(currentDomain)
        Dim sp As disCore.Web.FrontEnd.SessionProvider = New disCore.Web.FrontEnd.SessionProvider(configFileName, currentDomain, False)

        DebugMsg("")
        DebugMsg("::Main_page1 ApplyControls --------")
        DebugMsg("::Main_page1 ApplyControls action = " & action)
        DebugMsg("::Main_page1 ApplyControls act_param (url_id)  = " & act_param)
        DebugMsg("::Main_page1 ApplyControls Control = " & Qcontrol)

        ' rpereira 2009/01/19
        ' check if the logged user has permission to access the current link
        If LinkId > 0 AndAlso _
                Not BusinessRules.Security.Permissions.UserHasPermission(SessionVars.LoggedUserId, LinkId) Then

            Dim permissionsDeniedControl As PermissionsDenied = LoadControl("~/UserControls/Layout/PermissionsDenied.ascx")
            PlaceHolder1.Controls.Add(permissionsDeniedControl)

            Return
        End If

        Select Case action

            Case "SendCampaign"

                Dim mySendCampaign As SendCampaign = LoadControl("~/UserControls/Scheduler/SendCampaign.ascx")
                PlaceHolder1.Controls.Add(mySendCampaign)

            Case "ManageScheduler"

                'If Page.FindControl("manageSchedulerGroup") = Nothing Then

                '    Dim myManageSchedulerGroupsList As ManageSchedulerGroupsList = Me.LoadControl("~/UserControls/Scheduler/ManageSchedulerJobsList.ascx")
                '    myManageSchedulerGroupsList.ID = "manageSchedulerGroup"
                '    Me.PlaceHolder1.Controls.Add(myManageSchedulerGroupsList)

                'End If

                'Get the WebUserControl
                'Dim myManageSchedulerGroupsList As UserControl = CType(Page.FindControl("ManageSchedulerGroupsList"), UserControl)

                'Get user control's
                'Dim myRadTab = CType(myManageSchedulerGroupsList.FindControl("MainRT"), Telerik.Web.UI.RadToolBar)
                'Dim myRadGrid = CType(myManageSchedulerGroupsList.FindControl("MainRT"), Telerik.WebControls.RadGrid)

                'Add the necessary AJAX setting programmatically
                'RadAjaxManager1.AjaxSettings.AddAjaxSetting(myRadTab, myRadTab)

                Dim myManageSchedulerGroupsList As ManageSchedulerGroupsList = LoadControl("~/UserControls/Scheduler/ManageSchedulerGroupsList.ascx")
                PlaceHolder1.Controls.Add(myManageSchedulerGroupsList)

            Case "ManageSchedulerJob"

                Dim myManageSchedulerJobsList As ManageSchedulerJobsList = Me.LoadControl("~/UserControls/Scheduler/ManageSchedulerJobsList.ascx")
                PlaceHolder1.Controls.Add(myManageSchedulerJobsList)

            Case "ManageSchedulerError"
                Dim myManageSchedulerJobErrors As ManageSchedulerJobErrors = LoadControl("~/UserControls/Scheduler/ManageSchedulerJobErrors.ascx")
                PlaceHolder1.Controls.Add(myManageSchedulerJobErrors)

            Case "ManageSchedulerHistory"
                Dim myManageSchedulerHistory As ManageSchedulerJobHistory = LoadControl("~/UserControls/Scheduler/ManageSchedulerJobHistory.ascx")
                PlaceHolder1.Controls.Add(myManageSchedulerHistory)



The user control example

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ManageSchedulerGroupsList.ascx.vb"
    Inherits="NewsletterNet.ManageSchedulerGroupsList" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadGrid.Net2" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadComboBox.Net2" %>
<%@ Register TagPrefix="eeeksoft" Namespace="EeekSoft.Web" Assembly="Project_EeekSoft.Web.PopupWin" %>

<asp:ScriptManager id="scriptManager" runat="server" />
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
    <tr>
        <td background="service/res/OtlBlueBar.gif" style="height: 20px">
 
              
    <telerik2009:RadToolbar ID="MainRT" runat="server" SkinID="Default" OnButtonClick="MainRT_OnClick">
        <Items>
            <telerik2009:RadToolBarButton runat="server" ID="StartGroup" ImageUrl="~/App_Themes/Default/Images/16x16/Start.gif"
                ButtonText="Start" ToolTip="Start a job group" />
            <telerik2009:RadToolBarButton runat="server" ID="PauseGroup"  ImageUrl="~/App_Themes/Default/Images/16x16/Pause.gif"
                ButtonText="Pause" ToolTip="Pause a job group" />
            <telerik2009:RadToolbarButton runat="server" ID="CancelGroup"  ImageUrl="~/App_Themes/Default/Images/16x16/Stop.gif"
                ButtonText="Cancel" ToolTip="Cancel a job group" />
            <telerik2009:RadToolBarButton IsSeparator="true" />
            <telerik2009:RadToolbarButton runat="server" ID="ApproveGroup" ButtonText="Approve" ToolTip="Approve a job group"  ImageUrl="~/App_Themes/Default/Images/16x16/Checked.gif" />
            <telerik2009:RadToolBarButton IsSeparator="true" />
            <telerik2009:RadToolbarButton runat="server" ID="ViewHistory" SkinID="HistoryButton"
                CommandName="ViewHistory" ButtonText="View history" ToolTip="View job group history"  ImageUrl="~/App_Themes/Default/Images/16x16/JobHistory.gif"/>
            <telerik2009:RadToolbarButton runat="server" ID="ViewErrors" ButtonText="View Errors" ToolTip="View errors associated with the group" ImageUrl="~/App_Themes/Default/Images/16x16/JobError.gif" />
            <telerik2009:RadToolBarButton IsSeparator="true" />
            <telerik2009:RadToolbarButton runat="server" ID="ResendJobButton" ImageUrl="~/App_Themes/Default/Images/16x16/Resend.gif" ButtonText="Resend" ToolTip="Resend a job group" />
        </Items>
    </telerik2009:RadToolbar>

            <asp:Label ID="lb_tableName" Font-Names="Arial" Font-Size="15px" Font-Bold="True"
                ForeColor="White" runat="server">Manage Scheduler</asp:Label>
        </td>
    </tr>
</table>
<div class="MainToolbar">
</div>
<div class="MainContent">
    <ajax:Accordion id="pnlOptions" runat="server" selectedindex="-1" autosize="None"
        headercssclass="AccordionHeader" headerselectedcssclass="AccordionHeaderSelected"
        fadetransitions="false" transitionduration="250" framespersecond="40" requireopenedpane="false"
        suppressheaderpostbacks="true">
        <Panes>
            <ajax:AccordionPane runat="server" HeaderCssClass="AccordionHeader" ContentCssClass="AccordionContent">
                <Header>
                    <asp:Image ID="imgFilterImage" runat="server" SkinID="ShowIcon" />
                    <asp:Label ID="lblFilterTitle" runat="server" SkinID="AccordionTitle" Text="Filter"/>
                </Header>
                <Content>
                    <asp:CheckBox ID="chbHideCanceledAndFinished" runat="server" AutoPostBack="True" Font-Size="11px" Text="Show only active groups" Checked="true" />
                </Content>
            </ajax:AccordionPane>
        </Panes>
    </ajax:Accordion>
    <telerik:RadGrid ID="gridJobs" runat="server" SkinID="Default" AutoGenerateColumns="False"
        AllowSorting="True" AllowMultiRowSelection="True" AllowFilteringByColumn="true"
        AllowPaging="True" GridLines="None">
        <ClientSettings ApplyStylesOnClient="True">
            <Selecting AllowRowSelect="True"></Selecting>
        </ClientSettings>
        <MasterTableView Name="Newsletters" DataKeyNames="GroupId,CampaignId,NewsletterId"
            runat="server">
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Resizable="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridClientSelectColumn CommandName="Select" UniqueName="ClientSelectColumn" />
                <telerik:GridTemplateColumn HeaderText="Campaign" Reorderable="true" SortExpression="CampaignName">
                    <ItemTemplate>
                        <asp:LinkButton ID="hypCampaignName" runat="server" Text='<%# Bind("CampaignName") %>'
                            CommandName="ViewDetail" CommandArgument='<%# Bind("GroupId") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="NewsletterTitle" HeaderText="Newsletter">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MessagesToSend" HeaderText="Messages to send">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MessagesSent" HeaderText="Messages sent">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MessagesWithError" HeaderText="Messages with error">
                </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="DateToStart" HeaderText="To start at">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DateStarted" HeaderText="Started at">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DateFinished" HeaderText="Finished at">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</div>

<eeeksoft:PopupWin ID="popStatus" runat="server" Visible="False" Height="150px" Width="350px"
    DockMode="BottomRight" />

 

P.S - I´m changing control one at a time, so I don´t have to rollback like I did the first time I started to do the migration to the new controls. So expect to see telerik 2006 controls with telerik 2009 Q1 mixed.

Maybe that´s the problem.

Thank you in advanced.

Jose Granja
Top achievements
Rank 1
 answered on 29 Oct 2009
6 answers
302 views
I am encountering a similar problem to the problem description in forum entry
http://www.telerik.com/community/forums/aspnet-ajax/listbox/selectedindexchanged-does-not-fire.aspx .  This problem (the event not firing) has been tested and is "hard and repeatable".  It occurs when selecting an item that does not show in the first displayed group of items.  For example, I have a listbox with 20 items, but it is only tall enough to show 9 items at a time.  Clicking on any of the nine items displayed when the page first loads correctly causes the SelectedIndexChanged event to fire.  However, clicking on any item in the list that is below the first 9 will not produce the event and the selected item on screen will return to the originally selected item.

I have seen the code suggested in the above specified forum item which is to be "put on your page", but have no idea where/how to include the code on a web page so that it will run correctly.  I have included this code as javascript on the page, but then receive the following error "Microsoft JScript runtime error: 'Sys' is undefined" and have to ignore the error for the page to continue/complete loading.

Once the page loads, the listbox still behaves incorrectly per the problem description at the beginning of this entry.  The error "Microsoft JScript runtime error: 'Sys' is undefined" only occurs at page load - which indicates that the javascript does run at page load.  It will also occur if I click on an item displayed in the first 9 items.  It does NOT occur when I click on item 10 or higher.

This is occurring in "RadControls for ASP.NET AJAX Q2 2009"; Telerik.Web.UI.dll, version 2009.2.701.35; IE 8.0.6001.18828.

If I run the web page in IE8 in "compatibility mode", the listbox functions correctly.  This is not a satisfactory resolution.

Thanks in advance for any assistance!

Lynn

Genady Sergeev
Telerik team
 answered on 29 Oct 2009
3 answers
176 views
I am using the fully featured RadEditor for MOSS v5.4.

Sometimes, the component is no longer able to format content correctly. Usually, this occurs when lines or bullets are at the end of the text. It becomes impossible to remove unnecessary lines. Users must edit content with the HTML editior which is not so simple for standard users ...

Is there a fix for this?

Below code that is problematic : Delete lines of text at the end after the table element (do several tests if the lines disappear after validating the content. The behavior is a bit random. ;-)  ).

<p style="text-align: center;"><span style="font-size: 18px; color: #37992a; font-family: arial;"><strong>Bienvenue dans Négoce Village !<br />

</strong></span><span style="font-size: 13px; font-family: arial;"><strong><span style="font-size: 18px;"><span style="color: #37992a;">Le site des entreprises de négoce</span> <br />

</span></strong><span style="font-size: 24px; color: #37992a;">

<p style="text-align: left;"><span style="font-size: 13px; color: #000000; font-family: arial;"><strong>450 entreprises, 6 milliards de chiffre d'affaires, 11.000 personnes.<br />

<br />

</strong></span><span style="font-size: 13px; color: #000000;"><strong>Pour les activités d’agrofourniture,</strong> conseil, préconisation, distribution des intrants (fertilisants, produits phytopharmaceutiques, semences aliments pour animaux).<br />

</span><span style="color: #000000;"><span style="font-size: 13px;"><strong><br />

Pour le commerce des céréales oléagineux et protéagineux,</strong> collecte des productions, stockage, mise aux normes, commercialisation sur le marché intérieur et l’export.<br />

</span> <br />

</span><strong><span style="font-size: 32px;">

<table align="center">

    <thead>

    </thead>

    <tbody>

        <tr>

            <td>

            <p style="text-align: center;"><span style="font-size: 32px; color: #37992a;"><strong>Prochain Congrès<br />

             du Négoce Agricole<br />

            </strong></span><span style="color: #000000;"><span style="font-size: 24px;"><strong>vendredi 27 novembre 2009<br />

            </strong> à</span><span style="font-size: 24px;"> la bourse de commerce de Paris</span></span><span style="font-size: 24px;"> </span></p>

            </td>

        </tr>

    </tbody>

</table>

</span></strong></p>

<p style="text-align: center;"> </p>

<p style="text-align: center;"> </p>

</span>

<p style="text-align: center;"> </p>

<p style="text-align: left;"> </p>

</span></p>

<p>&nbsp;</p>

<p style="text-align: center;"> </p>

<p> </p>

<p style="text-align: center;"> </p>

<p> </p>

<p> </p>

<p style="text-align: center;"> </p>

<p> </p>

Rumen
Telerik team
 answered on 29 Oct 2009
3 answers
144 views
Hi,

I try to achieve a Self Referencing Hierarchy in Programmatic Grid with a xmlDataSource as defined on http://www.telerik.com/community/forums/aspnet-ajax/grid/self-referencing-hierarchy-in-programmatic-grid.aspx. I'm using RadControls for ASP.NET AJAX Q2 2009 (2009.2.826.35).

Here is a sample xml that I use

<Lines> 
    <Item ID="IDI-1-17" ParentID="" UserCode="B24R" Description="Base"/> 
    <Item ID="IDI-1-75" ParentID="IDI-1-17" UserCode="FL.TOE" Description="Flush Toe Kick"/> 
    <Item ID="IDI-1-20" ParentID="" UserCode="B24L" Description="Base"/> 
    <Item ID="IDI-1-57" ParentID="IDI-1-20" UserCode="FL.TOE" Description="Flush Toe Kick"/> 
    <Item ID="IDI-1-63" ParentID="IDI-1-20" UserCode="FD.SH" Description="Full Depth Shelf"/> 
    <Item ID="IDI-1-53" ParentID="IDI-1-20" UserCode="CT2" Description="Knife Section Kit"/> 
    <Item ID="IDI-1-26" ParentID="" UserCode="B36-2" Description="Base"/> 
    <Item ID="IDI-1-81" ParentID="IDI-1-26" UserCode="FL.TOE" Description="Flush Toe Kick"/> 
    <Item ID="IDI-1-36" ParentID="" UserCode="SBFD36" Description="Sink Base FHD"/> 
    <Item ID="IDI-1-83" ParentID="IDI-1-36" UserCode="FL.TOE" Description="Flush Toe Kick"/> 
    <Item ID="IDI-1-40" ParentID="IDI-1-36" UserCode="SK.21-1TUB" Description="21&quot; 1 Tub Sink"/> 
    <Item ID="IDI-1-22" ParentID="" UserCode="W2424" Description="Wall"/> 
    <Item ID="IDI-1-24" ParentID="" UserCode="W2424L-GL" Description="Wall w/Glass"/> 
</Lines> 
 

Here is the code which is very similar that the one in the other post

using System; 
using System.Data; 
using System.Configuration; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.Web.UI; 
using System.Reflection; 
 
public partial class _Default : System.Web.UI.Page 
{ 
    public RadGrid RadGrid1 = new RadGrid(); 
 
    protected void Page_Init(object sender, System.EventArgs e) 
    { 
        XmlDataSource source = new XmlDataSource(); 
 
        source.EnableCaching = false; 
        source.DataFile = "~/AllLines.xml"; 
        source.XPath = "/Lines/Item"; 
 
        RadGrid1.ID = "RadGrid1"; 
        RadGrid1.DataSource = source; 
        RadGrid1.Width = Unit.Percentage(98); 
        RadGrid1.PageSize = 5; 
        RadGrid1.AllowPaging = true; 
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; 
        RadGrid1.AutoGenerateColumns = false; 
        GridBoundColumn boundColumn = new GridBoundColumn(); 
        boundColumn.DataField = "ID"; 
        boundColumn.HeaderText = "ID"; 
        RadGrid1.MasterTableView.Columns.Add(boundColumn); 
        boundColumn = new GridBoundColumn(); 
        boundColumn.DataField = "UserCode"; 
        boundColumn.HeaderText = "UserCode"; 
        RadGrid1.MasterTableView.Columns.Add(boundColumn); 
        boundColumn = new GridBoundColumn(); 
        boundColumn.DataField = "Description"; 
        boundColumn.HeaderText = "Description"; 
        RadGrid1.MasterTableView.Columns.Add(boundColumn); 
        boundColumn = new GridBoundColumn(); 
        boundColumn.DataField = "ParentID"; 
        boundColumn.HeaderText = "ParentID"; 
        RadGrid1.MasterTableView.Columns.Add(boundColumn); 
        RadGrid1.Skin = "Web20"; 
        RadGrid1.ClientSettings.AllowExpandCollapse = true; 
        RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client; 
        RadGrid1.MasterTableView.HierarchyDefaultExpanded = true; 
        RadGrid1.MasterTableView.DataKeyNames = new string[] { "ID", "ParentID" }; 
        RadGrid1.MasterTableView.SelfHierarchySettings.ParentKeyName = "ID"; 
        RadGrid1.MasterTableView.SelfHierarchySettings.KeyName = "ParentID"; 
        form1.Controls.Add(RadGrid1); 
    } 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (Assembly.GetAssembly(typeof(ScriptManager)).FullName.IndexOf("3.5") != -1) 
        { 
            RadGrid1.MasterTableView.FilterExpression = @"it[""ID""] = ''"; 
        } 
        else 
        { 
            RadGrid1.MasterTableView.FilterExpression = "ID = ''"; 
        } 
 
    } 
   
} 
 
 


but I must be missing something or I do something wrong because there is no hierarchy once rendered.


Thanks



pylacroix
Top achievements
Rank 1
 answered on 29 Oct 2009
3 answers
336 views
Ok, here's a general question for everyone, including the Telerikians! :)

I have a grid, that does horizontal scrolling.  It does not do vertical scrolling because since it is inside a sitefinity portal, auto resizing the height is just no fun at all.  Therefore, I expand the grid depending on the number of columns per page, which gives me horizontal scrolling, and the vertical scrolling is taken care of by the browser.

Here's the problem.  If I am showing 100 rows per page, the grid is rather long, and the scrollbar for horizontal scrolling is WAY down at the bottom.  What I am looking for is a trick to scroll horizontally without scrolling down to use the horizontal scrollbar.

Tabbing is out, as the grid doesn't have keyboard navigation enabled, for reasons I won't go into here.  Using the left and right arrow keys work, but it is woefully slow.

Anyone have any tricks up their sleeve in this regard?

Thanks,

Kuba
Dimo
Telerik team
 answered on 29 Oct 2009
1 answer
1.4K+ views
Hello; I have two questions.

What is the difference between the Visible property and the Display property on a RadGrid's Column definition?

For example:

<rad:RadGrid ID="gdCompanies" runat="server"> 
  <MasterTableView AutoGenerateColumns="false" EditMode="EditForms"> 
    <Columns> 
    <rad:GridBoundColumn DataField="CompanyId" UniqueName="CompanyId" 
      Visible="false" 
      Display="false"/> 
    </Columns> 
  </MasterTableView> 
</rad:RadGrid> 
 

Also, is there a way to disable a field (specifically a GridBoundColumn) from being displayed in edit mode? I have tried visible=false and display=false, but the field is still displayed in edit mode (EditForms flavor).

Thanks,

Matthew

Schlurk
Top achievements
Rank 2
 answered on 29 Oct 2009
1 answer
68 views
I don't want to have any text in the grouptotal footer except for the amount. When I set the FooterText = "", it still displays "Sum: 13,123" in the group footer.  I just want "13,123".  If I don't set FooterText it sticks in the Sum: before the amount. What am I missing?  Any help would be appreciated!  Thanks in advance.
Daniel
Telerik team
 answered on 29 Oct 2009
4 answers
315 views
Hi,

I am evaluating the RadUpload control for purchase. I have a requirement to do the following:

1. Don't allow the user to upload any file that exceeds a certain size.
2. Don't allow the user to upload any file that will exceed the available storage that they have left on the server.

For example, let's assume that there is a limit of 15 MB per individual file, and the user has 20 MB of room left on the server. The user has selected three files to be uploaded. The first is 18MB, the second is 10MB, and the third is 12MB.
What I want is for the first file to not be uploaded (because it is over the individual file size limit of 15MB), the second file to upload successfully, and the third file to not be uploaded (because the user now only has 10MB of server space left after the second file was uploaded).

Can this be done with the RadUpload control?

Thx.
Basel Nimer
Top achievements
Rank 2
 answered on 29 Oct 2009
1 answer
114 views
I noticed that when you add multiple RadDocks to a RadDockZone, if the number of docks exceed the height of the zone, a scrollbar appears. This is cool.

However, when you scroll down and then try to drag the dock, wierd things happen - it looks like the dock is offset. This same problem presented itself pre-Prometheus (like 2 years ago) and I was told Prometheus would fix it.

I've attached an image.

Andrew
Pero
Telerik team
 answered on 29 Oct 2009
1 answer
145 views
Hi

I am using ToolTip control. I want to put it in a page dynamically. I have created tooltip, but it throw an exception. Script control 'TT_1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

could you help me what is the problem 

Greetings
Dimiter
 
Svetlina Anati
Telerik team
 answered on 29 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?