Announcement

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

    How can I sort ListGridField optionData

    SmartClient Version: v10.0p_2015-06-25/Pro Deployment (built 2015-06-25)


    I have a list grid with serveral listGridFields that call setOptionDataSource( MYDataSource ) to populate an option menu for that field. Is there a way to have the values in the option list sorted ??

    code is like:

    ListGridField myField = new ListGridField("name","title",length);
    myField.setOptionDataSource(DataSource.getDataSource("myDS");



    Thanks


    #2
    The picklist of options appears when the editor is active. So you can set the SelectItem or ComboBoxItem "sortField" via listGridField.editorProperties.

    Comment


      #3
      Looking at the listGridField api I see a set editorProperties method but its not clear to me ( assuming this is the correct method ) how to accomplish sorting the option list fields. Can you point me to an example ?

      Thanks

      Comment


        #4
        It works like all other situations where you pass in settings to configure a component. You just pass a ComboBoxItem or SelectItem where you have called setSortField() to setEditorProperties().

        Comment

        Working...
        X