Hello everyone,
I'm having problem with RadCombox here is my ASPX Code and i'm binding data using WCF
here is my WCF method
i have attached error message Image that get fired when i selecting one of list from RadComboBox
Please help me ,
I'm having problem with RadCombox here is my ASPX Code and i'm binding data using WCF
<telerik:RadComboBox ID="cmb" runat="server" Width="250px" Height="200px" Skin="Windows7" MarkFirstMatch="true" AllowCustomText="false" OnSelectedIndexChanged="cmb_SelectedIndexChanged" EmptyMessage="Select a Referral" EnableLoadOnDemand="true" DropDownAutoWidth="Enabled" EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnClientSelectedIndexChanged="onSelectedIndexChanged" AutoPostBack="true"> <WebServiceSettings Method="GetLookup" Path="../Services/CommonService.svc" /></telerik:RadComboBox>here is my WCF method
[OperationContract] public RadComboBoxData GetLookup(RadComboBoxContext context) { RadComboBoxData result = new RadComboBoxData(); List<Lookup> lst = null; try { lst = Data.GetLookup(); if (lst != null) { var alll = from rl in lst orderby rl.Name select new RadComboBoxItemData { Text = rl.Name, Value = Convert.ToString(rl.Id) }; string text = context.Text.Trim().ToLower(); if (!String.IsNullOrEmpty(text)) { alll = alll.Where(item => item.Text.Trim().ToLower().Contains(text)); } int numberOfItems = context.NumberOfItems; var ls = alll.Skip(numberOfItems).Take(10); result.Items = ls.ToArray(); int endOffset = numberOfItems + ls.Count(); int totalCount = alll.Count(); if (endOffset == totalCount) result.EndOfItems = true; result.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, totalCount); } } catch (Exception ex) { throw ex; } return result; }i have attached error message Image that get fired when i selecting one of list from RadComboBox
Please help me ,