Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    picklist setValueMap alternative

    Hello,
    We are using SmartClient_80_Pro. I use isc.RPCManager.sendRequest to get the selection list from server, build a value map (javascript associative array), and use setValueMap to set the selection.

    The problem with this approach is that the pickList cannot preserve the order of the data items that were passed back from the server. Is there a method similar to the setData in ListGrid for pickList? The setData method in ListGrid preserves the order

    Or is there a way we can call setValueMap and make the value map preserve the order of the list coming from the server? I guess there is no way to do it because of data structure has to be javascript associative array, but just wonder if there is any trick that you can suggest.

    I know use data source will resolve this, but it will be a bigger change for me, as I'm getting other data from the same isc.RPCManager.sendRequest call.

    Thanks!

    #2
    Not sure why you've headed down this path, but you should provide the data via an optionDataSource, by creating a clientOnly DataSource from the data you've retrieved. Or most likely better yet, remove everything you've done with RPCManager.sendRequest() and just switch over to using an optionDataSource to actual fetch the data, which will enable sorting, filtering and many other features.

    Comment

    Working...
    X