Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
This all worked in visual studio 2008, I just upgraded to 2010, project is targeted to 4 framework, ajax toolkit 40412 and latest telerik toolkit RadControls for ASP.NET AJAX Q1 2010
In my first page I have this:
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"
        EnableTheming="True">
    <AuthenticationService Path="~/Services/SpendusAuthService.asmx" />
       <Scripts>
          <asp:ScriptReference Path="~/js/logon.js"/>
       </Scripts>
       <Services>
          <asp:ServiceReference Path="~/EndPoints/RegistrationService.svc" />
       </Services>
    </telerik:RadScriptManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Forest">
               </telerik:RadWindowManager>

and when I attempt to run I get this error :
Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

If I switch the the toolkitscriptmanager I get telerik errors with radwindowmanager. what to do
T. Tsonev
Telerik team
 answered on 25 Jun 2010
0 answers
563 views

You can find information about known issues and important changes for the entire UI for ASP.NET AJAX suite in the following pinned thread: Known Issues and Important Changes in UI for ASP.NET AJAX.

 

Q1 SP2 2010 (Version number: 2010.1.519 and lower)

Problem: The RadScriptManager is incompatible with the Ajax Control Toolkit (Version number 40412 and higher).

The following error appears when controls from the ACT are present on the page:
Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

Solution for .NET 4.0 projects:  Upgrade the RadControls for ASP.NET AJAX version 2010.1.625 or newer.

Important: Make sure you use the .NET 4.0 build of both Telerik.Web.UI.dll and AjaxControlToolkit.dll

If upgrade is not an option use the following workaround:
<telerik:RadScriptManager runat="server" EnableScriptCombine="false" /> 

Solution for .NET 3.5 projects: Override the references to MicrosoftAjax.js and MicrosoftAjaxWebForms.js to point to the ACT script files.

<telerik:RadScriptManager runat="server"> 
    <Scripts> 
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
            Name="MicrosoftAjax.js" Path="Scripts-40412/MicrosoftAjax.js" /> 
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
            Name="MicrosoftAjaxWebForms.js" Path="Scripts-40412/MicrosoftAjaxWebForms.js" /> 
    </Scripts> 
</telerik:RadScriptManager> 
 

The script files are obtained by building the ACT from source. Sample project, including the scripts for version 40412, is attached in the related forum post: FIX: RadScriptManager compatibility issues with Ajax Control Toolkit
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 25 Jun 2010
1 answer
93 views
Hi,

I'm using Telerik Controls V2010.1.519.35 with Google Chrome V5.0.375.86.

My RadScheduler control is web service bound, and is a TimelineView, grouped by resource.

Initially, the Scheduler displays with all the date headers intact, and the Resources listed correctly down the side, however when the Scheduler displays the appointments, many of the headings disappear - this does not occur on Firefox or IE7, and surprisingly does not occur on Safari 4.

I note that the headings also disappear on pages that have no appointments, and the pattern of missing headers differs.

I have looked in Chrome's Element viewer, and the TH elements that appear empty are indeed empty, so it's the DOM, not the webkit renderer that's at fault.

Hope that you can fix it.

Cheers,

Mark
Peter
Telerik team
 answered on 25 Jun 2010
5 answers
157 views
It appears that the AutoCompleteSeparator property prevents the Text property from being updated in a databound RadComboBox when the SelectedIndex is changed during an AJAX postback. (So I click the Reset button, and the SelectedIndex gets set programmatically to 0, as intended, but users still see the previously selected text in the control.)

 

<telerik:RadComboBox ID="MyComboBox" runat="server" Width="250" CausesValidation="false" AutoPostBack="false" MarkFirstMatch="true" AllowCustomText="false" AutoCompleteSeparator=";" ExpandAnimation-Duration="250" AccessKey="O" /> 
Kalina
Telerik team
 answered on 25 Jun 2010
3 answers
367 views

Hi

I have a RadListView with a RadComboBox in the fieldset itemtemplate, and the RadComboBox has a CheckBox ItemTemplate.

What I’m need to do is to change the text of the first item in my combobox and hide the checkbox.

It works fine if I have only one combobox but I need this in a ListView.
Thanks,
Nicole

 protected void RadListView1_ItemDataBound(object sender, RadListViewItemEventArgs e)  
 {  
 
            RadComboBox cmbColores = (RadComboBox)e.Item.FindControl("cbmColores1");  
 
            DataTable dt = CargarCombos();  
 
            //Add Item  
            dt.Rows.Add(-1, "");  
 
            DataView dv = new DataView();  
            dv = dt.DefaultView;  
            dv.Sort = "NombreCompleto";  
            DataTable dt1 = dv.ToTable();  
 
            cmbColores.DataSource = dt1;  
            cmbColores.DataTextField = "NombreCompleto";  
            cmbColores.DataValueField = "SKUID";  
            cmbColores.DataBind();  
             //change text: first item combobox
            cmbColores.FindItemByValue("-1").Text = " -- Seleccione --";  
            RadComboBoxItem item = cmbColores.FindItemByValue("-1");  
            CheckBox chk = (CheckBox)item.FindControl("chk1");  
             //first item combobox
            chk.Visible = false;  
 
} 

 

 <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="true" runat="server" 
                    ItemPlaceholderID="ProductsHolder" DataKeyNames="SKUID" OnNeedDataSource="RadListView1_NeedDataSource" 
                    OnItemDataBound="RadListView1_ItemDataBound" OnItemCommand="RadListView1_ItemCommand">  
                    <ItemTemplate> 
                        <fieldset> 
 
                        <telerik:RadComboBox ID="cbmColores1" runat="server" Skin="Windows7" Width="180px" 
                          EmptyMessage="Color..." LoadingMessage="Cargando..." OnClientDropDownClosed="onDropDownClosing" 
                         AutoPostBack="False">  
                                            <ItemTemplate> 
                                                <div onclick="StopPropagation(event)">  
                                                    <asp:CheckBox runat="server" ID="chk1" Checked="false" /> 
                                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">  
                                                     <%# DataBinder.Eval(Container.DataItem, "NombreCompleto")%> 
                                                    </asp:Label> 
                                                </div> 
                                            </ItemTemplate> 
                                        </telerik:RadComboBox> 
                         </fieldset> 
                    </ItemTemplate> 
                    <LayoutTemplate> 
                        <fieldset id="RadListView1" > 
                         </fieldset> 
                    </LayoutTemplate> 
                </telerik:RadListView> 


Nikolay Rusev
Telerik team
 answered on 25 Jun 2010
1 answer
135 views
hi,

I have only one Grid in my form.

I don't want to use paging but to display all data (some 400 data) all at once with scrollbar, and want to maximise the Grid display to full screen height and width. 

However, it never appears in 100% height & 100% width no matter what I do.

Imagine that I have a 19" monitor and the Grid only use up half the screen with scrollbar (rather than full screen with scrollbar) ..

Please help..

Thanks

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" 
    Culture="auto" %> 
 
<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Untitled Page</title> 
    <style type="text/css">  
    </style> 
</head> 
<body style="height:100%">  
    <form id="form1" runat="server" style="height:100%">  
    <asp:ScriptManager runat="server" ID="Manager1">  
    </asp:ScriptManager> 
 
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" 
        PageSize="7" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="False" Height="100%" 
        OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" 
        OnPreRender="RadGrid1_PreRender" onitemcommand="RadGrid1_ItemCommand">  
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView Width="100%" DataKeyNames="CustomerID" AllowMultiColumnSorting="True" Name="MasterTable" 
         CommandItemDisplay="Top" HierarchyLoadMode="Client">  
         <CommandItemTemplate>    
            <div align="left">    
              <asp:LinkButton ID="initInsertLinkButton" runat="server" CommandName="InitInsert">Add new    
              </asp:LinkButton>    
              <asp:LinkButton ID="editSelectedLinkButton" runat="server" CommandName="EditSelected">Edit Selected    
              </asp:LinkButton>    
            </div>    
        </CommandItemTemplate>    
 
           
            <ExpandCollapseColumn Visible="True">  
            </ExpandCollapseColumn> 
            <Columns>                 
                <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" 
                    DataField="CustomerID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" 
                    DataField="ContactName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" 
                    DataField="CompanyName">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True"></Selecting> 
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents> 
            <Scrolling AllowScroll="true" ScrollHeight="100%"  /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    </form> 
</body> 
</html> 
 


Dimo
Telerik team
 answered on 25 Jun 2010
1 answer
207 views
i keep getting this error

Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object

when I click on the second or third tab

when I try to implement the load on demand radtabstrip demo

i am using 2010.1 519 version of the controls

the demo seems to say this should work - is this a bug?

aspx page
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <script type="text/javascript"> 
        function onTabSelecting(sender, args) { 
            var foo = args.get_tab(); 
            if (args.get_tab().get_pageViewID()) { 
                args.get_tab().set_postBack(false); 
            } 
        } 
    </script> 
                    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" 
                        MultiPageID="RadMultiPage1" Orientation="HorizontalTop" 
                        OnTabClick="RadTabStrip1_TabClick" OnClientTabSelecting="onTabSelecting"> 
                    </telerik:RadTabStrip> 
                    <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" 
                        Height="250px" Width="475px" BorderWidth="1" OnPageViewCreated="RadMultiPage1_PageViewCreated"> 
                    </telerik:RadMultiPage> 


code behind
 protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            AddTab(RadTabStrip1, "Tab1"); 
            AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab1")); 
            AddTab(RadTabStrip1, "Tab2"); 
            //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab2")); 
            AddTab(RadTabStrip1, "Tab3"); 
            //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab3")); 
        } 
    } 
 
    private void AddTab(RadTabStrip tabstrip, string tabName) 
    { 
        RadTab tab = new RadTab(); 
        tab.Text = tabName; 
        tabstrip.Tabs.Add(tab); 
    } 
 
    private void AddPageView(RadMultiPage multipage, RadTab tab) 
    { 
        RadPageView pageView = new RadPageView(); 
        pageView.ID = tab.Text; 
        multipage.PageViews.Add(pageView); 
        tab.PageViewID = pageView.ID; 
    } 
 
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) 
    { 
        AddPageView(RadMultiPage1, e.Tab); 
        e.Tab.PageView.Selected = true; 
    } 
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) 
    { 
        string userControlPath = "~/WebUserControl.ascx"; 
 
        Control userControl = Page.LoadControl(userControlPath); 
        if (e.PageView.ID == "Tab1") 
        { 
            userControl.ID = "UserControl1"; 
        } 
        else if (e.PageView.ID == "Tab2") 
        { 
            userControl.ID = "UserControl2"; 
        } 
        else if (e.PageView.ID == "Tab3") 
        { 
            userControl.ID = "UserControl3"; 
        } 
 
        e.PageView.Controls.Add(userControl); 
    } 
Yana
Telerik team
 answered on 25 Jun 2010
1 answer
268 views
Hi,
I have a page with RadGrid with AllowPaging="true", AllowSorting="true", AutoGenerateColumns="false".
The data in the grid populated correctly without any problem.
When user click on the header of 1 of the column, the data in the grid is sorted according to the column (ascending/descending) without problem.
But after user click on the header of the column, an arrow will appear beside the header of the column, when click on the arrow, will hit error:
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Attached is the screenshot of the error:
error01.jpeg - Before click on header of column
error02.jpeg - After click on colum header "Schedule Name" then the data is sorted according to the column and an arrow appear beside "Schedule Name"
error03.jpg - After click on the arrow beside "Schedule Name", hit error

What should i do?
Thanks!
Pavlina
Telerik team
 answered on 25 Jun 2010
5 answers
173 views
I essentially copied the code from the Scheduler demo.  The only major differences are that I am utilizing an asp:ObjectDataSource to get data for the Timeline, and I did not set any of the DataRecurrence values.  I'm not certain of what the DataRecurrence values even do, but the ObjectDataSource appears to be working correctly to pull the data (at least, it pulls the GroupBy labels correctly).

I have just one entry from a database being pulled for the actual timeline, for testing purposes.  I cannot see the entry within the timeline.  However, advancing the timeline forward shrinks the row height, making it appear that the data is pulled but is just not shown properly.  I have attached a screenshot of this behavior.

Here is a sample of the Timeline control's code within my aspx file (I am not yet utilizing this control in the back-end):

<telerik:RadScheduler runat="server" ShowViewTabs="false" OverflowBehavior="Expand" ColumnWidth="250px" TimelineView-NumberOfSlots="30" ID="timeline" GroupBy="Type" GroupingDirection="Vertical" DataSourceID="timelineDataSource" SelectedView="TimelineView" DataKeyField="RegulatoryResultsId" DataStartField="CreatedOn" DataEndField="ReceiveOn" DataSubjectField="Description"> 
        <ResourceTypes> 
            <telerik:ResourceType  KeyField="TypeId" Name="Type" TextField="TypeName" ForeignKeyField="TypeValue" 
                        DataSourceID="timelineSectionSource" /> 
        </ResourceTypes> 
</telerik:RadScheduler> 

Vuyiswa
Top achievements
Rank 2
 answered on 25 Jun 2010
1 answer
97 views
I am writing a program that opens up a RadWindow for the user to select a user, the window returns the appropriate info from the customer selected. In the ClientClose function I have been trying to make 'pnlCustomerInfoCustomerData' visible=True. I have attached my code below that I am trying to use, any help would be great.

<telerik:radscriptmanager runat="server" ID="ScriptManager" EnablePageMethods="True"></telerik:radscriptmanager>  
 
    <telerik:radscriptblock runat="server" ID="radScriptBlock">  
        <script type="text/javascript">  
            function openCustomerLookupWindow()  
            {                    
                var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>");    
                var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>");    
                var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>");    
                var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>");    
                var oWnd = window.radopen('../../Lookups/NavCustomerLookup.aspx?navco=<%=session("SP_SearchCustomerNavCompany")%>&no=' + txtNo.get_value() + '&conam=' + txtCoNam.get_value() + '&cpn=' + txtCPN.get_value() + '&city=' + txtCity.get_value() + '&state=' + cboState.get_value() + '',"winCustomerLookup");  
                //oWnd.argument = combo.get_value();   
                oWnd.Center();  
                //oWnd.SetSize(800,500);  
            }  
              
            function clientShow(sender, eventArgs)  
            {  
                //var txtDate = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                //sender.argument = txtDate.get_value;    
                //sender.argument = document.getElementById('<%=txtExistingCustomerSearchCustomerNo.ClientID%>').innerText;   
            }  
 
            function clientClose(oWnd,args)  
            {  
                var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>");    
                var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>");    
                var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>");    
                var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>");    
                //get the transferred arguments  
                var arg = args.get_argument();  
                if(arg)  
                {   
                    var CustomerNo = arg.CustomerNo;  
                    var CompanyName = arg.CompanyName;  
                    var ContactPersonName = arg.ContactPersonName;  
                    var CustomerCity = arg.CustomerCity;  
                    var CustomerState = arg.CustomerState;  
                      
                    txtNo.set_value(CustomerNo);  
                    txtCoNam.set_value(CompanyName);  
                    txtCPN.set_value(ContactPersonName);  
                    txtCity.set_value(CustomerCity);  
                    cboState.set_value(CustomerState);  
                    document.getElementById('pnlCustomerInfoCustomerData').style.display = 'none';            
                }  
                document.forms[0].submit();  
            }  
              
              
        </script>  
    </telerik:radscriptblock> 


The Panel I use:
<telerik:radajaxpanel runat="server" LoadingPanelID="LoadingPanel" ID="AjaxPanel" Wrap="False" EnableAJAX="False">  
<asp:Panel ID="pnlCustomerInfoCustomerData" runat="server"></asp:Panel>  
</telerik:RadAjaxPanel> 
Georgi Tunev
Telerik team
 answered on 25 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?