Is it possible to add/remove items from the DropDownProvider/EditorControl at the client?
I have a specific set of values that are to be in the dropdown based upon the content of the WebDataGrid cell. These values are available at the client.
For example, I've attempted to clear the dropdown items from the EditorControl (ddCtl)
items.get_length()remains the same,and the items.remove(items.getItem(0)) is performing an async postback
var items = ddCtl.get_items();
while (items.get_length())
items.remove(items.getItem(0));
Any help would certainly be appreciated!
Thank you!
Hi,
If you are referring to adding and removing items on the client, add() and remove() will always do async postback, so that the server-side item collection st***nchronized with the client-side item collection.
I suggest to also try to use getLength instead of the derived get_length, because javascript objects ($IG.DropDownItem instances) are created on demand on the client, and get_length may return less than the visible number of items (html LI elements).
For totally clearing the collection, you can also try calling dispose() on the item collection, i.e. items.dispose(). For the item references themselves you can do items._items = [] , but none of this will synchronize the server-side collection of items, or change the actual HTML markup for the dropdown list.
Thanks for your feedback,
Angel
I will give your suggestions a try. I just updated the post to clarify that I'd like to do this client side (there is no server side collection to syncronize)I'll do a post back on the CellExitedEditMode - after a selection is made
Thanks for the Quick Reply ;)
I need the HTML for the dropdown to be updated as wellWill attempt to populate and position a standard dropdown to the WebDataGrid cell at the client
Thanks!
Quickly learned that trying to position an element on the webdatagrid that works with all browsers is a bit involved ;)
Have decided to adjust the design to make use of the webdropdown as it...