Approved
Last Updated: 20 Apr 2017 13:04 by ADMIN
ADMIN
Vessy
Created on: 20 Apr 2017 13:03
Category: UI for ASP.NET AJAX
Type: Bug Report
0
JS error is thrown when the Rotator items do not fill its viewport and EnableRandomOrder="true"
S error is thrown when the Rotator items do not fill its viewport and EnableRandomOrder="true". The problem occurs in all render modes, when the width of the Rotator is set to 100%.

Error message:
Uncaught Error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: element

WORKAROUNDS:
- set EnableRandomOrder="false" or
- set fixed width to the control, e.g. Width="1000px"



Reproduction code:
        <telerik:RadRotator ID="ProductRotator" runat="server" RotatorType="AutomaticAdvance" Height="100"
            ItemHeight="90" Skin="Default" Width="100%" EnableRandomOrder="true" ScrollDuration="1000">
            <ItemTemplate>
                <div style="width:100px; height: 75px; border: 1px solid red">
                    <%# Eval("title")%>
                </div>
            </ItemTemplate>
        </telerik:RadRotator>


    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ProductRotator.DataSource = GetData();//Producten;
            ProductRotator.DataBind();
        }
    }
    private object GetData()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("title", typeof(string));
        dt.Columns.Add("desc", typeof(string));
        dt.Rows.Add("T1", "AAA");
        dt.Rows.Add("T2", "BBB");
        dt.Rows.Add("T3", "CCC");
        return dt;
    }
0 comments