Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
403 views
We are getting an error when trying to use the Rad Rotator on one of the pages of our ASP.NET 4.0 application. The rotator will load some of the time, other times, we get this error -
Error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element
Source File: http://localhost:9310/ScriptResource.axd?d=Og_O6TllbWaFOFwDL58zidgG5xexh_EpqE1FBp0IrVx1QMXVLRV_HIzBkd8GOTRutd37dLhAUd4mEXqoyCd_yuCwpZMeMn_t9LTLgFMckE9oWmUHtvPumKOdZcZC855DWCHXZw2&t=ffffffff8674b0ba
Line: 4621

I have removed the majority of the code inside of the Rotator to try and pin down this issue, but to no avail. Below is the rotator declaration:
<telerik:RadRotator ID="imgRotatorFeaturedPhoto" runat="server"
ClientIDMode="Static" ScrollDirection="Left"
RotatorType="AutomaticAdvance" Width="210" ItemWidth="210" Height="285" ItemHeight="285"
 FrameDuration="5000"  WrapFrames="false" ScrollDuration="500">
<ItemTemplate>
<div style="text-align:center;">
    <div style="background-color:#E6E7E8;padding-bottom:5px;height:150px;padding-top:5px;" runat="server" id="divImageHolder">
   
    <asp:Image runat="server" ID="imgImageItemFP" ClientIDMode="AutoID" CssClass="hoverImage" />
    </div>
    <div style="border-top:1px solid White;background-color:Black;color:White;height:118px;text-align:left;padding-top:5px;">
     <div class="defaultTextColor bold">
            <strong><asp:Label runat="server" ID="lblTitle"></asp:Label></strong>&nbsp;
            <asp:Label ID="lblDate" runat="server"></asp:Label>
            </div>                
        <div class="details">
            <asp:Label ID="lblRetailer" runat="server" style="color:White;"></asp:Label>
            </div>
        <div class="details">
            <asp:Label ID="lblBanner" runat="server" style="color:White;"></asp:Label>
            </div>
            <div class="details">
             <strong>Location:</strong>&nbsp;<asp:Label ID="lblLocation" runat="server"></asp:Label>
            </div>
            <div style="padding-top:5px;">
    <asp:HyperLink runat="server" ID="hlGoToMediaGallery" NavigateUrl="/MediaGallery/MediaGalleryHome.aspx" CssClass="BackgroundBlue" Text="GO TO MEDIA GALLERY"></asp:HyperLink>    
</div>
    </div>
</div>
</ItemTemplate>
</telerik:RadRotator>


During the page load, we bind a list of Images to the rotator, and inside of the ItemDataBound event, we set up the links, and all of the Labels, etc.

It appears to not even get to this point, and all we see is a blank white box where the rotator is supposed to go. I have done some research, and some people seem to think that this is a bug inside of the Microsoft AJAX Control toolkit, which we are using in other parts of the page.

Thanks

Eric
Eric
Top achievements
Rank 1
 answered on 30 Sep 2011
7 answers
170 views
Hi,

I have a menu that is being populated via a web service. It is functioning correctly right now, however, a couple levels deep in the nesting has the items display off the screen. We need to implement a max height on the boxes to prevent this. How would we do this with the control? I have tried using the Group Settings height, however cannot get the desired behavior.

Thanks,
Steve
Helen
Telerik team
 answered on 30 Sep 2011
1 answer
255 views
Hi everyone,

I have a load on demand radmenu, but i don´t know how to set the height for the group dinamicaly, i would like to set the same height example 200px if the height is great than 200px.

I put the code i use,

Thanks in advance,

Jolynice



default2.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default2.aspx.cs" Inherits="default2" %><br>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><br>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br>
<br>
<html xmlns="http://www.w3.org/1999/xhtml"><br>
<head runat="server"><br>
    <title></title><br>
</head><br>
<body><br>
    <form id="form1" runat="server"><br>
    <div><br>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager><br>
        <div><br>
            <div><br>
                Hover a menu item to populate its children from the WCF service.<br>
            </div><br>
        </div>   <br>
        <br>
<br>
        <br /><br>
<br>
        <div>            <br>
        <telerik:RadMenu runat="server" ID="RadMenu2"             <br>
            DataSourceID="SqlDataSource1"<br>
            DataTextField="name"<br>
            DataValueField="CategoryId"<br>
            EnableRoundedCorners="true" EnableShadows="true"> <br>
            <WebServiceSettings Path="MenuWcfService.svc" Method="LoadDataCategorias" />                       <br>
            <LoadingStatusTemplate><br>
                <asp:Image runat="server" ID="LoadingImage" ImageUrl="ajax-loader.gif" ToolTip="Loading..." Width="16px" Height="16px" style="margin-top:8px" /><br>
            </LoadingStatusTemplate><br>
            <DataBindings>                <br>
                <telerik:RadMenuItemBinding  Depth="0" ExpandMode="WebService" /><br>
            </DataBindings><br>
    <br>
<br>
        </telerik:RadMenu><br>
<br>
<br>
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" <br>
                SelectCommand="select categoryid,name,parentCategoryid from  dbo.Nop_Category where parentCategoryid = 0" <br>
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" <br>
                SelectCommandType="Text">  <br>
     </asp:SqlDataSource><br>
        </div><br>
<br>
        <div style="padding-top:80px;"></div><br>
    </div><br>
    </form><br>
</body><br>
</html>


MenuWcfService.svc

using System;<br>
using System.Collections.Generic;<br>
using System.Linq;<br>
using System.ServiceModel;<br>
using System.ServiceModel.Activation;<br>
using Telerik.Web.UI;<br>
using System.Data.SqlClient;<br>
using System.Data;<br>
using System.Configuration;<br>
<br>
<br>
namespace Test<br>
{<br>
    [ServiceContract(Namespace = "")]<br>
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]<br>
    public class MenuWcfService<br>
    {<br>
<br>
        //1.<br>
        [OperationContract]<br>
        public RadMenuItemData[] LoadDataCategorias(RadMenuItemData item, IDictionary<string, object> context)<br>
        {<br>
            DataTable data = GetChildNodes(item.Value);<br>
            List<RadMenuItemData> result = new List<RadMenuItemData>();<br>
<br>
            foreach (DataRow row in data.Rows)<br>
            {<br>
                RadMenuItemData itemData = new RadMenuItemData();<br>
                itemData.Text = row["name"].ToString();<br>
                itemData.Value = row["CategoryId"].ToString();<br>
                itemData.NavigateUrl = "http://www.google.pt";<br>
                if (Convert.ToInt32(row["ChildrenCount"]) > 0)<br>
                {<br>
                    itemData.ExpandMode = MenuItemExpandMode.WebService;<br>
                }<br>
                result.Add(itemData);<br>
            }<br>
<br>
            return result.ToArray();<br>
        }<br>
<br>
        //2<br>
        private static DataTable GetChildNodes(string parentId)<br>
        {<br>
            SqlCommand selectCommand = new SqlCommand(@"select pc1.categoryid,pc1.name,isnull(pc2.childrencount,0) as childrencount<br>
                                                      from dbo.Nop_Category as pc1<br>
                                                      left outer join <br>
                                                        (<br>
                                                            select parentCategoryid,count(*) as childrencount<br>
                                                            from dbo.Nop_Category group by (parentCategoryid)<br>
                                                            )as pc2<br>
                                                      on <br>
                                                      pc1.categoryid = pc2.parentCategoryid<br>
                                                      where pc1.parentCategoryid = @parentId");<br>
<br>
            selectCommand.Parameters.AddWithValue("parentId", parentId);<br>
            return GetData(selectCommand);<br>
        }<br>
<br>
        //3<br>
        private static DataTable GetData(SqlCommand selectCommand)<br>
        {<br>
            selectCommand.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);<br>
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);<br>
<br>
            DataTable data = new DataTable();<br>
            adapter.Fill(data);<br>
<br>
            return data;<br>
        }      <br>
    }<br>
}





Helen
Telerik team
 answered on 30 Sep 2011
1 answer
83 views
Hi,

I have an issue with the Telerik grid. My grid comes up with 3 visible columns so no horizontal scrollbar is shown. One of the columns is frozen. I resize one of the columns and increase the width until the horizontal scrollbar apears. When I use the horizontal scollbar now, the frozen column also scrolls away with the rest of the columns. Is this a bug in the Grid?

Thanks for your time!
Princy
Top achievements
Rank 2
 answered on 30 Sep 2011
2 answers
175 views
Hi
Button Enabled property is not working when used with radajaxpanel.
I kept the button outside the radajaxpanel.In page load i am able to Enable it .
But i am handling checkbox check changed event .This check box is a  radgrid column and the radgrid id inside radajaxpanel.Inside this event i am not able to enable/disable the button .
When i remove the ajax panel it is working .
Could anybody please let me know a solution for this.

Thanks..
Winni
Top achievements
Rank 1
 answered on 30 Sep 2011
1 answer
216 views
Hi,

I have a radGrid and in that there are multiple radNumeric textboxes. Please see attached image.
The issue is of focusing next textbox.
After selecting value in first textbox, I need to press tab key 3 times to focus the next textbox. It should be focused by just clicking one tab key. I know the reason that it renders two other hidden fields for numeric textboxes. But I need to disable the other two to focus the next one on just a single tab key press.

<input id="ctl00_cphMainContent_gvFinalTest_ctl02_txtRound1_text" class="riTextBox riEnabled" type="text" style="width:100%;" name="ctl00_cphMainContent_gvFinalTest_ctl02_txtRound1_text">
<input id="ctl00_cphMainContent_gvFinalTest_ctl02_txtRound1" class="rdfd_" type="text" title="" value="" style="visibility:hidden;float:right;margin:-18px 0 0 -1px;width:1px;height:1px;overflow:hidden;border:0;padding:0;">
<input id="ctl00_cphMainContent_gvFinalTest_ctl02_txtRound1_Value" class="rdfd_" type="text" title="" value="" name="ctl00$cphMainContent$gvFinalTest$ctl02$txtRound1" style="visibility:hidden;float:right;margin:-18px 0 0 -1px;width:1px;height:1px;overflow:hidden;border:0;padding:0;">

What is the solution for this issue?
Kevin
Top achievements
Rank 2
 answered on 30 Sep 2011
30 answers
990 views
I have one template column which has an image. But the image doesnt get exported, and I ALREADY TRIED the ExportOnlyData= false and it still doesnt work
Daniel
Telerik team
 answered on 30 Sep 2011
2 answers
97 views
Error:  Sys.WebForms.PageRequestManagerParserErrorException:

I have a page which I want to be able to do 2 things, but so far I get the error above when I try to enable both of them. 

First I have my sliding pane which works just fine and all is good.  Inside the pane is a control with a button.  This button works fine as well (and it works on other pages too).  The problem is when I add code to have the sliding pane open through code (posted below) I get the error mentioned above and it will not work.  How can I fix this?  come more details about my setup.

Code to open pane:

 

 

 

<telerik:RadScriptBlock runat="server">
                <script
                    type="text/javascript"
                    language="javascript">
                    function pageLoaded(sender, args) {
                        var settings = sender._postBackSettings;
                        if (settings != null) {
                            var postbackControlID = new String(settings.sourceElement.id);
                            if (postbackControlID.toUpperCase().indexOf("PRIORITYLINKBUTTON", 0) > 0) {
                                var slidingZone = $find("<%= RadSlidingZone1.ClientID %>");
                                if (slidingZone != null) {
                                    var prioritySlidingPane = slidingZone.getPaneById("<%= RightSlidePane.ClientID %>");
                                    slidingZone.expandPane("<%= RightSlidePane.ClientID %>");
                                }
                            }
                        }
                    }
                </script>
<script
    type="text/javascript"
    language="javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded)
</script>

Code for Ajax Manager - this is the code which A) makes the pane correctly slide out when a specified item is selected and B) causes the error being thrown when the button is clicked.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="CollaborateDiscussionPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="CollaborateDiscussionPanel"  />
                <telerik:AjaxUpdatedControl ControlID="PManagerSummary1" />
            </UpdatedControls
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="PManagerSummary1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="PManagerSummary1" />
            </UpdatedControls
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
PManagerSummary1 is the user control which has the button to be clicked and is the control in the sliding pane which slides out.

Adam Heeg
Top achievements
Rank 1
 answered on 30 Sep 2011
5 answers
133 views
I have a calendar control in the panel in the page. If the panel is visible, I show it and make it disabled on situation and enable it back. If the panel is not visible, obviously control is not loaded yet but when make panel visible and enable the calender it doesn't show the calender icon instead shows "Open the calender" message on the right with textbox. It looks like control is not loading properly by making it panel visible in the run time. 

Please let me know is there a way to fix it.
Pavlina
Telerik team
 answered on 30 Sep 2011
1 answer
88 views
This question is once again related to the page I created and discussed here.

I noticed that if the page is inactive for a period of time, say, 10-15 minutes. and then I mouse over on the grid column to display tool tip, I get exception. 

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception occurs when I try to add control for tooltip using statement

e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl)

Here is the Stack trace.

at System.Collections.ArrayList.get_Item(Int32 index)
at Telerik.Web.UI.GridColumnCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState)
at Telerik.Web.UI.GridTableView.LoadStructureState(Object SavedStructure)
at Telerik.Web.UI.RadGrid.LoadTableViewStructure(IEnumerator stateEnumerator, GridTableView tableView)
at Telerik.Web.UI.RadGrid.LoadViewState(Object savedStateObject)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at CoreWebAdmin.OrderProductSummary.radToolTipManager_AjaxUpdate(Object sender, ToolTipUpdateEventArgs e) in J:\Work\Yitz\eBayPosting\CoreWebAdmin\Orders\OrderProductSummary.aspx.vb:line 1557
at Telerik.Web.UI.RadToolTipManager.OnAjaxUpdate(ToolTipUpdateEventArgs e)
at Telerik.Web.UI.RadToolTipManager.LoadClientState(Dictionary`2 clientState)
at Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Note that I have about 10 columns in the grid, and about 8 columns are displaying tooltip. Each tooltip has different data but almost same structure of the controls to be added into tooltip. (They all use Table object which contains a RadGrid and some other controls maybe). 

   I noticed that this error occures on one or two columns, but not on all columns. If I try to display tooltip on other columns and then try back on the specific columns where it had above errors, it display them fine. I am not sure why?

   Do you think I can solve this issue by disabling ViewState on the page (or on some specific control)? Or if there is any other idea, please share.


   Thanks,
   Sameers
Marin Bratanov
Telerik team
 answered on 30 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?