Announcement

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

  • Order of ListGridFields changed after use of setUseAllDataSourceFields(true)

    Greetings,

    as said in the title, i have a ListGrid bound to a datasource so i dont need to create all the listGridFields since they are created automatically. so i wanted to add a listGridField on the fly and not create the DataSourceField corresponding in the DataSource, to do that i created the listGridField, then
    Code:
     LisGrid.setdfields(new Field)
    . the problem i've faced was that the listGrid displayed only the new Field, so to be able to display all other field of the Datasource additionally to the new Field, i called this.listGrid.setUseAllDataSourceFields( true );
    the last problem that i couldnt resolve was the displayed order of the columns of the listGrid, i wanted the new field ti be added at last, but it was added in the first column.
    i hope i was enough clear.

  • #2
    Do a getFields() call on the Datasource and then add your custom field to that collection.

    Then add them all in order you want to the setFields() call.

    Comment


    • #3
      Originally posted by amcculley
      Do a getFields() call on the Datasource and then add your custom field to that collection.

      Then add them all in order you want to the setFields() call.
      thanks for the response,
      in first place, i'd used that solution, but realized that the new field was totally foreign to the dataSource, so it's very important for the structure of the application that i don't add that field to the dataSource.

      Comment

      Working...
      X