I have a ListGrid that is bound to a DataSource with many Fields. On initial display of the ListGrid I would like to limit the display to Fields A, B, C, but still allow the user to use the ListGrid Header module to add/remove columns as they see fit.
Any easy way to do that?
See DataSourceField.setDetail() and ListGridField showIf
ListGridField showIf ability will be added shortly.
Sanjiv
Excellent - setDetail() was exactly what I was looking for - thank you!
While it looks like setDetail() is what I need right now, could you provide an example of how to use showif when you add it to the api. Looking at the SmartClient api, it looks like it takes a string of script, but I’m not sure exactly what that means.
Thanks again.
The ListGridField.showIf method needs to be removed. Please use ListGridField.setShowIfCondition(ListGridFieldIfFunction)
The users’ ListGridFieldIfFunction implementation is evaluated to conditionally determine whether this field should be displayed. Evaluated on initial draw, then reevaluated on explicit calls to listGrid.refreshFields() or listGrid.setFields().