Announcement

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

    displayField in filter

    Hello,
    I'm using latest SmartGWT night build from 13. Jun. When I use following code for ListGrid definition:
    Code:
    isc.ListGrid.create({
        ID: "countryList",
        autoFetchData: true,
        showFilterEditor: true,
        width:500, height:224, alternateRecordStyles:true,
        data: countryData,
        fields:[
        {
    		name : "name",
    		title : "Name",
    		required : true,
    		length : 10,
    		width : "100",
    		type : "text"
    	}, {
    		name : "typIdent1",
    		title : "Typ Ident",
    		required : true,
    		filterEditorProperties : {
    			optionDataSource : 'typIdentification',
    			displayField : 'name'
    		},
    		width : "250",
    		pickListWidth : 550,
    		valueField : "id",
    		displayField : "typIdent1VAL",
    		editorType : "ComboBoxItem",
    		colSpan : 4,
    		align : "left",
    		type : "integer",
    		pickListWidth : 700,
    		colSpan : null
    	}
        ],
    })
    and type some value in filter row in Name column and press Enter, value is copied also to second column. I guess it's because of 'name' in definition of filterEditorProperties. However here I mean 'name' field of 'typIdentification' DS not 'name' field of countryList DS. I was following recommendations in "ListGridField.optionDataSource" help page for big ValueMaps. Is it bug? How can I define it right way?

    TNX

    #2
    Hello,

    Just to clarify - you say you're using SmartGWT, but this is JavaScript code. Presumably you're actually using SmartClient and writing code in JavaScript, not using SmartGWT (which would involve writing code in Java and using the Google Web Toolkit to compile / deploy).

    There are also a couple of things in the attached block of code that look slightly off, so we can't guarantee we're exactly reproducing your use case.
    However, it seems like an issue that can be resolved by specifying criterionField:"typIdent1" on your filterEditorProperties block.

    Let us know if that doesn't resolve it for you (and please, if you could provide a working standalone example we can actually run to see any further issues you encounter, it will be much easier for us to get to the bottom of future issues)

    Thanks
    Isomorphic Software

    Comment


      #3
      Originally posted by Isomorphic
      Just to clarify - you say you're using SmartGWT, but this is JavaScript code. Presumably you're actually using SmartClient and writing code in JavaScript, not using SmartGWT (which would involve writing code in Java and using the Google Web Toolkit to compile / deploy).
      We are using SmartGWT for Java advantages (type and name safety) but definition of DS is generated on server side from Hibernate with some manual touches.

      Originally posted by Isomorphic
      There are also a couple of things in the attached block of code that look slightly off, so we can't guarantee we're exactly reproducing your use case.
      However, it seems like an issue that can be resolved by specifying criterionField:"typIdent1" on your filterEditorProperties block.
      Is criterionField documented somewhere? Can't find it in standard documentation. We are using specific approach. We are reusing same definition for DS, ListGrid and DynamicForm. That's maybe why it looks little bit strange. Do you see some major issue in this approach?

      Originally posted by Isomorphic
      Let us know if that doesn't resolve it for you (and please, if you could provide a working standalone example we can actually run to see any further issues you encounter, it will be much easier for us to get to the bottom of future issues)
      I'm always using when possible your showcase. Go to e.g. http://www.smartclient.com/#columnOrder and paste my code to JS tab. Evaluate.

      It helps, now everything is working again.

      Thank you very much

      Pavel

      Comment

      Working...
      X