Go Back   SmartClient Forums > Smart GWT Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 7th Apr 2012, 12:07
jay.l.fisher jay.l.fisher is offline
Registered Developer
 
Join Date: Oct 2009
Posts: 982
Default How to control order of ListGrid fields when using setUseAllDataSourceFields(true)

I have a ListGrid where I want all data source fields to appear first, then followed by a set of fields that are not in the datasource. I'm calling setUseAllDataSourceFields(true) then calling setFields() to add the extra fields.

The problem is that the extra fields appear as the first columns. I should mention that the extra fields are grouped with HeaderSpans. How do I get those fields to appear as the rightmost columns?

The doc for setUseAllDataSourceFields(true) says this, which I don't quite follow.
Quote:
If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.
Can you explain what is meant by that last sentence?
Reply With Quote
  #2  
Old 9th Apr 2012, 10:07
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,581
Default

It's an accurate but very pithy sentence :) Take a look at this sample - note how the code specifies an item for the "password" field with providing any settings on that item. The purpose of doing this is so that subsequently added FormItems appear after the password field.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSource and ListGrid - Is the order important? SrArcos Smart GWT Technical Q&A 1 3rd May 2012 13:15
isc.screenReader issue acarur01 Technical Q&A 16 1st Mar 2012 04:38
Datasource used for two selectitem with different fetch operations works unexpectedly curiousgally Smart GWT Technical Q&A 2 18th Nov 2011 14:13
Hilite in ListGrid based on Derived (Calculated) Fields pkelley Smart GWT Technical Q&A 2 3rd Oct 2011 10:12
Getting ListGrid fields before grid is drawn jay.l.fisher Smart GWT Technical Q&A 2 12th Apr 2010 06:24

© 2010,2011 Isomorphic Software. All Rights Reserved