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

[Solved] Clear combobox items after delete button click

1 Answer 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gerard Eikelboom
Top achievements
Rank 1
Gerard Eikelboom asked on 10 Mar 2011, 01:01 PM
Hi,
I have a grid. When I select a row in that grid I fill a combobox with Items which belongs to that specific row.
So each time I select a row the combobox is filled with different items via an ajax call.
I have a delete button.
How do I empty the combobox with all it's items? When I click the delete button.
I can do another AJAX call and send no items with it to controller, this will return in my case en empty string back and the combo will be empty.
Is there a way I don't have to do an ajax call?
But just empty it client side.


Regards,
Gerard Eikelboom 

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 10 Mar 2011, 04:35 PM
Hello Gerard,

In order to achieve your goal you will need to bind CombBox to call dataBind() without parameters:

$("#ComboBox").data('tComboBox').dataBind()


Regards,
Georgi Krustev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
ComboBox
Asked by
Gerard Eikelboom
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or