Load time:
Web Service load on demand does not request the page and avoids the execution of the page life cycle. Less data is transferred between the client and the server.
This property will save a time and use the result from the previous request with the same parameters.
[WebMethod] public IEnumerable GetItems(RadComboBoxContext context) { int numberOfItems = 1000; List<ComboBoxItemData> items = new List<ComboBoxItemData>(); for (int i = 0; i < numberOfItems; i++) { ComboBoxItemData itemData = new ComboBoxItemData(); itemData.Text = "Item " + i; items.Add(itemData); } return items; }
class ComboBoxItemData { private string text; public string Text { get { return text; } set { text = value; } } }
The OnClientItemsRequesting and OnClientItemsRequested events are used only to measure the time requred to perform the load on demand operation. Consuming them is not required for the proper operation of RadComboBox in this scenario.
www.telerik.com | Terms of Use | Contact Us