Hi All,
Here i had used RadComboBox with _itemsrequested property and also total count of the items(i.e Items 1-5 out off 20) in the combobox at the bottom, Their is an issue regarding that (i.e on page load when i click on the combobox for the first time i am unable to get the total count of the combobox items but when i click on the area where i get that message then i will be getting the items message (i.e Items 1-5 out off 20) this message is been placed in the _itemsRequested so i am able to get the items message at the bottom of the combobox so how do i get the items count message on page load when i click on the combobox for first time.
Here is the code
protected void cmbPlatformName_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e){DataTable data = objTaskmanLib.GetData(e.Text); //GetData(e.Text);
//objTaskmanLib is the library file from where i get the count.
RadComboBoxItem item = new RadComboBoxItem();int itemOffset = e.NumberOfItems;int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);e.EndOfItems = endOffset == data.Rows.Count;for (int i = itemOffset; i < endOffset; i++){cmbPlatformName.Items.Add(new RadComboBoxItem(data.Rows[i]["Platform_Name"].ToString(), data.Rows[i]["Platform_Name"].ToString()));}e.Message = GetStatusMessage(endOffset, data.Rows.Count);}private string GetStatusMessage(int endOffset, int total){if (total <= 0)return "No matches";return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, total);}
Here i had used this GetStatusMessage function only in the _itemsRequested event so i am able to get the items message(i.e Items 1-5 out off 20) when i click on the area where items message is been displayed. so can any one help me how to use this function on page load also.
Thanks in advance.