This is a migrated thread and some comments may be shown as answers.

Missing Scrollbar in EnableLoadOnDemand="True" Mode

1 Answer 50 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Khourshed Yakubov
Top achievements
Rank 1
Khourshed Yakubov asked on 02 Jul 2010, 07:44 AM
Hi!
I am trying to test RadComboBox in EnableLoadOnDemand="True" Mode.
Here is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %> 
 
<%@ 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></title
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <div> 
                <telerik:RadComboBox ID="ActiveWebProjectCombo" runat="server" Width="350px"  
                    EnableLoadOnDemand="True" 
                    ItemsPerRequest="10" 
                ShowMoreResultsBox="True" EnableVirtualScrolling="True" onitemsrequested="ActiveWebProjectCombo_ItemsRequested"  
                    > 
                </telerik:RadComboBox> 
    </div> 
    </form> 
</body> 
</html> 

public partial class Test : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
    protected void ActiveWebProjectCombo_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) 
    { 
        WebProjectDataContext _dc = new WebProjectDataContext(); 
        int _count = (int)_dc.cms_WebProject_GetAvailableWebProjectsCount(_dc.UserId, _dc.WebProjectId, "%"); 
        int _itemsLoaded = e.NumberOfItems; 
        int _start = (int)Math.Truncate((double)(_itemsLoaded / 10)); 
        var _data = _dc.cms_WebProject_ListAvailableWebprojects(_dc.UserId, _dc.WebProjectId, "%"true, _start, 10); 
        if (e.NumberOfItems == 0) 
        { 
            ActiveWebProjectCombo.Items.Clear(); 
        } 
        foreach (cms_WebProject_ListAvailableWebprojectsResult _record in _data) 
        { 
            RadComboBoxItem _item = new RadComboBoxItem(_record.PROJECT_URL, _record.COMPONENT_ID.ToString()); 
            ActiveWebProjectCombo.Items.Add(_item); 
            _itemsLoaded++; 
        } 
        e.EndOfItems = _itemsLoaded >= _count; 
    } 

It seems code is working fine, except of hidden scrollbar. What I am doing wrong?
_dc.cms_WebProject_ListAvailableWebprojects(_dc.UserId, _dc.WebProjectId, "%"true, _start, 10) implements paged access to list of data which is showed in RadComboBox.

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 06 Jul 2010, 01:14 PM
Hi Khourshed Yakubov,

You could resolve this by specifying either the Height or the MaxHeight property.

Regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Khourshed Yakubov
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or