I can't add a new item in client side...
Load the webdropDown..
var cboFormat = $find("<%= WebDropDown_Checkbox.ClientID %>"); var comboItem = new ???
Please, help..
Hi,
http://samples.infragistics.com => 2009.1 => WebDropDown => Client Events sample
function addItem(e) { var combo = $find('<%= myDropDown.ClientID %>'); var textbox = $get("<%=txtNewItem.ClientID %>"); if (textbox.value != "") { var item = combo.get_items().createItem(); item.set_text(textbox.value); item.set_value(textbox.value); combo.get_items().add(item); } }
Hope it helps,
Angel
Even i have a similar problem, when i followed the example i am not able to load more than one item. Is there a way to add more than one item in a loop?
This is possible, but with the current implementation an AJAX request is made after every item is added through the add() function on the client. This is because we need to syncronize the server-side collection of items, so that it is consistent with the client-side.
So if you do several calls to add() in a loop, most probably the rest will fail, because the browser can normally handle only 2 ajax requests at the same time.
The solution is for us to add a new function called addRange() which will allow you to add more than one item at the same time, and only have 1 ajax request triggered for this operation.
The same for delete.
We will consider adding this API functionality as soon as possible. I will keep you updated.
Thanks for the feedback,
How is this functionality progressing? When i try adding several items in a loop, the dropdown stops working properly. Can i add items in some other way to get around this bug?
Right now i'm adding them in the same way as in the code sample you mentioned.
Did you ever wrote addRange() functionality. I am using 12.1.
Batch add/remove/update , data binding and rebinding on the client-side without postbacks is part of our plans for the 11.1 release. it shouldn't be considered as a bug. In the meantime i suggest that you contact development support and they will consider your scenario and provide you with a sample with some custom javascript code about how this could be done entirely on the client side.
Thanks,