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

Issue clearing RadCombobox databount to Page method

1 Answer 46 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Prava kafle
Top achievements
Rank 1
Prava kafle asked on 22 Aug 2012, 08:25 PM

Hi,

I am dynamically adding RadComboBoxes to placeholder and I have a search Button and reset Button.
I am using Page method to data bind  RadComboBox as shown in the link.
On clicking "search" Button,  I collect values from these Comboxes and process the information.
By clicking "Reset" button, I  clear the selection from Comboboxes .

After a post back from "search" button, if I try to reset ComboBoxes, it does not clear the selection from  comboBoxes.
But if "Reset"  button is clicked before any post back to server,   it successfully  clears selection from comboBoxes.



Dynamically Adding Comboxes :
             RadComboBox  radAutoCompleteBox = new RadComboBox();
             radAutoCompleteBox  .ID = f"ACPTBox"+ i;
              radAutoCompleteBox.WebServiceSettings.Method = "GetDataForSearchControl";
              radAutoCompleteBox.WebServiceSettings.Path = "TSearch.aspx";
              radAutoCompleteBox.CssClass = "TSrchCBBox"; 
              
              radAutoCompleteBox.OnClientItemsRequesting = "autoCompleteRequesting";
             
              radAutoCompleteBox.Skin = "Office2010Blue";
              radAutoCompleteBox.EnableEmbeddedSkins = true;
              radAutoCompleteBox.EnableViewState = true;
              radAutoCompleteBox.AutoPostBack = false;
              radAutoCompleteBox.AllowCustomText = true;
              radAutoCompleteBox.EnableLoadOnDemand = true;
              radAutoCompleteBox.EnableVirtualScrolling = true;
              radAutoCompleteBox.ShowMoreResultsBox = true;
             
           

TO CLEAR SELECTION 

                  radAutoCompleteBox.ClearSelection(); //THIS DOES NOT WORK
                  radAutoCompleteBox.Items.Clear(); 
                  radAutoCompleteBox.SelectedIndex = -1;
                  radAutoCompleteBox.Text = "";


             

http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx 

Can someone help me in solving this issue?
Thanks,
Prava

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 24 Aug 2012, 10:56 AM
Hi Prava,

Thank you for contacting Telerik team.

Attached is a sample page which shows what I have tested locally. As my tests show there seems that the RadComboBox works just as expected. Would you please take a look at it and let me know if there is something I am missing?

Thank you in advance for your cooperation.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Prava kafle
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or