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

Multiselect dropdownlist refresh problem

3 Answers 608 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Viral
Top achievements
Rank 1
Viral asked on 27 Apr 2015, 08:14 AM

I am new to telerik control and having problem with refresh/auto post back. Previous coder has added telerik multi select drop down (with check boxes) and ajax panel. it's working fine when you select this first time. 

when drop down is closed and you try to select another value, it lets you select it. you can see new value is selected in drop down text box. soon as you close drop down it changes text box value to previous values. you open third time and you can see selected values that you have choosen second time but it does not update textbox (dropdown box). 

 

see image to get more information. 

 

3 Answers, 1 is accepted

Sort by
0
Viral
Top achievements
Rank 1
answered on 27 Apr 2015, 08:26 AM
just realise that when you select new value it does not refresh but when you unselect value it does refresh and display correctly. when I press save button it does store all value correctly in all cases.  
0
Ivan Danchev
Telerik team
answered on 27 Apr 2015, 01:18 PM
Hello,

I believe you are talking about the RadComboBox because the RadDropDownList does not support check boxes.

The RadComboBox keeps its state, in this case the checked items, regardless of its AutoPostBack property value and lists the checked items in its input field. You can test its behavior with the following settings:
<telerik:RadComboBox ID="rcbPart" runat="server" Width="200px" Height="350px" CheckedItemsTexts="FitInInput" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
    AllowCustomText="True">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="Apple Cider" />
        <telerik:RadComboBoxItem runat="server" Text="Apples" />
        <telerik:RadComboBoxItem runat="server" Text="Grape Juice" />
        <telerik:RadComboBoxItem runat="server" Text="Grapes" />
        <telerik:RadComboBoxItem runat="server" Text="Peaches" />
        <telerik:RadComboBoxItem runat="server" Text="Persimmons" />
        <telerik:RadComboBoxItem runat="server" Text="Plums" />
    </Items>
</telerik:RadComboBox>

If you set its AutoPostBack property to "true" if you check or uncheck an Item and then close the drop-down it will perform a postback. If you wrap it in a RadAjaxPanel instead of doing a postback it will refresh only the RadComboBox.

If you are not getting all the checked items in the input field this could be due to the implemented custom logic. It would be helpful if you could post the markup section where the RadComboBox is declared and the code that is executed in its event handlers, server and client-side.
 
Regards,
Ivan Danchev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Viral
Top achievements
Rank 1
answered on 27 Apr 2015, 03:03 PM

your code was working fine so I made changes to my radcombobox. added AllowCustomText="True" and it's working fine. 

thank you for your help. 

Tags
DropDownList
Asked by
Viral
Top achievements
Rank 1
Answers by
Viral
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or