I am using the autocomplete feature of the webdropdown. It works well with a SqlDataSource, however when I bind it to a webservice, the page loads up well. But as I type in the textbox, I get an error which reads
Async request failed
[Exception]: RowFilter is incorrect. at Infragistics.Web.UI.Framework.Data.FilterRecord.ParseRowFilter(String rowFilter)... so on
In the Page_Load of my code behind, I have:
Dim getCities As New GetCities
WebDropDown3.DataSource = getCities.GetCities2()
WebDropDown3.TextField = "cty_name"
WebDropDown3.EnableAutoFiltering = ListControls.AutoFiltering.Server
WebDropDown3.EnableLoadOnDemand = True
Web Service Code
<WebMethod()>
Public Function GetCities2() As String()
Dim term As String = Context.Request.QueryString("term")
Dim cities As New Generic.List(Of String)
Dim constring As String = "Data Source=(local); Initial Catalog=rereE;User Id=eer;Password=ddd"
Dim con As New SqlConnection(constring)
Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
Try
con.Open()
Dim sql As String = "SELECT cty_name,cty_code,cty_zip from city"
Dim adpter As SqlDataAdapter = New SqlDataAdapter(sql, con)
Dim ds As DataSet = New DataSet("cities")
adpter.Fill(ds)
For Each dr As DataRow In ds.Tables(0).Rows
cities.Add(dr("cty_name").ToString)
Next
con.Close()
Catch ex As Exception
Context.Response.Write("Error:" + ex.Message)
End Try
Return cities.ToArray
Can some one tell me what is it that I am doing Wrong?.
Thanks,
Pradeep
http://es.infragistics.com/community/forums/p/86636/432069.aspx#432069
Can you please assist on my issue as it is very simular?
Thanks
Hi Pradeep,
It has been some time since your post, however in case you still need assistance I would be glad to help.
In this scenario, in order to make use of the autofiltering features of WebDropDown I would suggest that you modify your service's webmethod - GetCities, to return a DataTable or DataSet (which in your case is already available - ds) and use them as the datasource for your dropdown.
Please feel free to contact me if you have any questions.