i am trying to get a multicolumn combo to populate but cannot get it to display correctly
the combo is as follows:-
then the webservice call looks like this....
running an old version of the controls:- v2.0.50727
Any help is greatly appreciated
Cheers,
Craig
the combo is as follows:-
<telerik:RadComboBox ID="comboBoxBoard" runat="server" Filter="Contains" EmptyMessage="Boarding at" Height="150px" Width="250px" EnableLoadOnDemand="true" ShowMoreResultsBox="true" Font-Bold="true" Font-Size="120%" Font-Italic="false" CssClass="CustomRadComboxCssClass" Skin="50pxOffice2007" EnableEmbeddedSkins="false" ItemRequestTimeout="500" EnableVirtualScrolling="true" MarkFirstMatch="true" AllowCustomText="false" OnClientItemsRequesting="OnClientItemsRequesting_DubBus_Board" > <WebServiceSettings Method="GetStopDataByRouteTest" Path="~/Templates/public/RoutePlannerService/RTPIWebServiceProxy.asmx" /> <HeaderTemplate> <ul> <li class="col1">Value</li> <li class="col2">No</li> <li class="col3">Address</li> <li class="col4">Location</li> <li class="col5">Stage</li> </ul> </HeaderTemplate> <ItemTemplate> <li class="col1"> <%# DataBinder.Eval(Container, "Value")%> <li class="col2"> <%# DataBinder.Eval(Container, "Text")%> <li class="col3"> <%# DataBinder.Eval(Container, "Attributes['Address']")%> <li class="col4"> <%# DataBinder.Eval(Container, "Attributes['Location']")%> <li class="col5"> <%# DataBinder.Eval(Container, "Attributes['Stage']")%> </ItemTemplate></telerik:RadComboBox>then the webservice call looks like this....
[WebMethod] // Cached for 24 hours public RadComboBoxData GetStopDataByRouteTest(RadComboBoxContext context) { //string route = context["Text"].ToString(); //string direction = context["Direction"].ToString(); //string numberOfItems = context["NumberOfItems"].ToString(); string route = "1"; string direction = "I"; string numberOfItems = "0"; try { RadComboBoxData comboData = new RadComboBoxData(); var dtBoarding = GetStopByRouteAndDirection(route, direction); if (dtBoarding.Rows.Count > 0) { int itemsCount; int.TryParse(numberOfItems, out itemsCount); int itemOffset = itemsCount; int endOffset = Math.Min(itemOffset + ITEMS_PER_REQUEST, dtBoarding.Rows.Count); comboData.EndOfItems = endOffset == dtBoarding.Rows.Count; List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(endOffset - itemOffset); foreach (DataRow dataRow in dtBoarding.Rows) { RadComboBoxItemData itemData = new RadComboBoxItemData(); string stopNumber = dataRow["StopNumber"].ToString(); string address = dataRow["Address"].ToString(); string location = dataRow["Location"].ToString(); string stage = (dataRow["StageNumber"].ToString() != string.Empty ? dataRow["StageNumber"].ToString() : ""); itemData.Value = stopNumber; itemData.Text = stopNumber; itemData.Attributes.Add("Address", address); itemData.Attributes.Add("Location", location); itemData.Attributes.Add("Stage", stage); result.Add(itemData); } comboData.Message = GetStatusMessage(endOffset, dtBoarding.Rows.Count); comboData.Items = result.ToArray(); } if (comboData.Items == null) comboData.Items = new RadComboBoxItemData[0]; return comboData; } catch (Exception ex) { return null; } }running an old version of the controls:- v2.0.50727
Any help is greatly appreciated
Cheers,
Craig