This is a migrated thread and some comments may be shown as answers.

Radcombo drop down not working for Server Side Automatic Demand Mode

6 Answers 149 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 09 Nov 2010, 11:09 PM
The text area populates, and combo indicates there are several items but I can't get the list to drop down.  A web service is attatched to combo by way of ObjectDataSource.

asp.net;
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px"
     width="95%">
     <telerik:RadComboBox ID="RadComboSearch" Runat="server" AutoPostBack="True"
         EmptyMessage="Type your search query here;" Height="98%"
         ShowDropDownOnTextboxClick="True" ShowMoreResultsBox="True"
         Text="Enter Search Criteria" Width="100%" AllowCustomText="True"
         EnableVirtualScrolling="True" MarkFirstMatch="True"
         DataSourceID="MyWebServices" DataValueField="StringResult" DataTextField="StringResult"
         EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10"
         >
     </telerik:RadComboBox>
     <asp:ObjectDataSource ID="MyWebServices" runat="server" SelectMethod="SearchBoxResult"
   
         TypeName="NVSS_Manual.Lookup" >
         <SelectParameters>
             <asp:ControlParameter ControlID="RadComboSearch" Name="SearchString"
                 PropertyName="Text" Type="String" />
         </SelectParameters>
     </asp:ObjectDataSource>
 </telerik:RadAjaxPanel>

The data provider is a method on the page that calls a web service and converts the dataset to a datatable

public DataTable SearchBoxResult(string SearchString)
{
    DataTable ReturnValue = null;
    NVSS_ManualWebService.NVSS_Manual_WebService ws = new NVSS_ManualWebService.NVSS_Manual_WebService();
    DataSet ds =ws.Search_BoxResult();
    ReturnValue = ds.Tables[0];
    return ReturnValue;
}

The web service is simply plugs some values into a dataset for purpose of demonstration;

...
[WebMethod]
    public DataSet Search_BoxResult()
    {
        DataSet ds = new DataSet();
        DataTable dt = new DataTable();
        DataColumn dc=new DataColumn("StringResult", Type.GetType("System.String"));
        dt.Columns.Add(dc);
        ds.Tables.Add(dt);
 
        dt.Rows.Add("Appendicitus");
        dt.Rows.Add("aaa1");
        dt.Rows.Add("aaa3");
        dt.Rows.Add("aaa2");
        return ds;
    }
...

see also attached.

Would be grateful for any ideas.  Thank you.

6 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 10 Nov 2010, 06:08 PM
Hi John,

This is a strange behavior.

Could you please try removing the Height attribute from the RadComboBox definition or set it to pixels to see whether it changes anything?

Kind regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 10 Nov 2010, 07:45 PM
Yes, that was it.  Go figure.  Thanks!

Two more questions related to code posted. 

1. I am passing back to the data source method what is in the text portion of the combo.  Unfortunately it's always the default value of the text portion of the combo box.  The updated text portion of the combo is never passed back on each keystroke.

2. Is it possible to disable the "filtering" of the drop down list as you type characters?  I will be relying on, eventually on the web service the combo calls to do that (it has it's own algorithm)  and  of course I have the "Filter" property set to "None".


Thanks.
0
Simon
Telerik team
answered on 16 Nov 2010, 02:32 PM
Hello John,

The text in the input of the RadComboBox is properly submitted on postback, which means that its value will be the last, i.e. up-to-date. On the other hand, the control properly sends its text to the WebMethod on each key press. So in both cases, the property's value reflects the latest changes. I am not sure why this does not work in your case as it is in all of our demos.

About the second issue, your idea will suffice, i.e. Filter="None" & the filtering logic moved to the WebMethod.

So, can you elaborate more on the first issue or what exactly is not working on your side?

All the best,
Simon
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
John
Top achievements
Rank 1
answered on 19 Nov 2010, 06:46 PM
About First issue;
In addtion to passing back the contents of the radcombo I was trying to get the selecteditems of a another controll on the same page a radlistbox, first by a referance inside the "selectmethod" (came back null)[and I now understand why that is], then by creating a second parameter in the objectdatasource where by I pass back the radlists property of selecteditem collection, unfortunataly it is not serializable and so was not able to do that with out a serialization error.  Ended up for the listbox by which I wished to pass back the selection to set up an "on selection index changed" event where I stored all the selected items into a session variable as a string  array.  On the second parameter of of the selectectmethod for the object datasourse rather than reference the radlist box selecteditems collection i referanced the session variable which did work.

About Second issue;
Even when the filter is set to none the radcombo still filters the drop down list by what I type in.  I need the radcombo to just display what the webservice is passing back and not try to filter anything in the drop down.  Any suggestions?

Thank you for your time.
0
Simon
Telerik team
answered on 24 Nov 2010, 11:36 AM
Hi John,

Thank you for getting back to me.

The second issue originates from the fact that the automatic Load On Demand always filters data by default with a 'starts with' filter unless the Filter property is set to Contains, when the control filters in the other way. The case Filter=None during automatic Load On Demand is not supported.

What would you expect to happen in this case? Should the control be read-only and only allow loading Items either on portions or all at once?

About the first issue, I guess you have resolved it, is this correct?

Kind regards,
Simon
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
John
Top achievements
Rank 1
answered on 24 Nov 2010, 05:11 PM
I ended up punting, was having to many issues.  Not sure why, but I got to get something to demo.  Ended up implementing ItemsRequested event server side.  I can grab data from any control on the page and all controls are visible to the event, and can populate from web service from there.  Since I'm relying on web service for doing  filter logic it works out doubly well.

Thanks so much for your support, it helped get to a solution a lot faster than I would otherwise.
Tags
ComboBox
Asked by
John
Top achievements
Rank 1
Answers by
Simon
Telerik team
John
Top achievements
Rank 1
Share this question
or