-
9 Dec 2010 5:25 AM #1
Trim - help required for correct syntax
Trim - help required for correct syntax
Hello, when the 'value' below is returned from the LookupFld, it is being appended with a leading space.
I'm trying to remove this space by using Ext.util.Format.trim but don't know where it should be applied.
I hope someone can advise where it should go and the correct syntax.
Many thanks.
PHP Code:TSPBudgetCodes03 = new form.ComboBox(
{fieldLabel: 'Budget code of requestor',
name: 'txtTSPBudgetCodes03',
store: new Ext.data.Store({
url: 'agntAdminConfig.xml?OpenAgent&LookupFld=txtTSPBudgetCodes',
reader: new Ext.data.XmlReader({record: 'entrydata', id: 'id'}, [{name: 'value', mapping: 'text'}]) }),
displayField: 'value',
typeAhead: false,
editable: false,
mode: 'remote',
triggerAction: 'all',
emptyText: 'Please select',
selectOnFocus: true,
allowBlank: false,
anchor: '55%'});
-
9 Dec 2010 5:30 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 43
I assume the extra space is already in the loaded XML file, so you need:
Code:{name: 'value', mapping: 'text', convert: Ext.util.Format.trim}
-
9 Dec 2010 6:04 AM #3
Condor,
Brilliant, just what I was looking for.
Many thanks, much appreciated.
Similar Threads
-
Correct syntax and location for a valid sencha touch (js) function?
By EduardoIbarra in forum Sencha Touch 1.x: DiscussionReplies: 1Last Post: 25 Nov 2010, 5:03 PM -
Is there a trim filter?
By cappuccino in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 11 Oct 2008, 1:50 AM -
Do not trim in combobox but do trim for filter
By hobbes in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 3 May 2008, 2:55 AM


Reply With Quote