Announcement

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

    Inconsistent behaviour for displayField in ListGrid and SelectItem

    When I define DataSourceField with displayField attribute and optionDataSource which point to same datasource (for example parent attribute) in ListGrid correct parent value is shown. But in DetailForm build above same datasource value is comming from current row not from parent row. It's documented this way but it is very inconsistent.

    How could I achieve same behavior in ListGrid and DetailForm having same DataSource?

    TNX

    Pavel

    #2
    Set optionDataSource on the FormItem.

    Comment


      #3
      Doesn't help

      It doesn't help. In ListGrid is fine but in DynamicForm is still showing current instead of foreign record. I did it little bit tricky way but I hope it's fine:
      Code:
      FormItem fi = new FormItem(dataSource.getField(fieldName).getJsObj())
      displayField is set to "textRef" and textRef is defined as:
      Code:
      {name:"textRef" , type:"text" , hidden:true , canEdit:false , getFieldValue:  function(record, value, field, fieldName) { return '' + 'Name: ' + record.name + ', Org Unit Kind: ' + record.orgUnitKind + ', Boss: ' + record.boss;}}
      Am I doing something wrong?

      Pavel

      Comment


        #4
        Hi
        Thanks for pointing out this inconsistency. We've made a change to resolve this in 7.0 final.

        In the meantime do you have a working solution in your application? It seems the code you pasted above should work

        Thanks
        Isomorphic Software

        Comment


          #5
          Thanks for resolving it. I should wait for final release, I'm still far to finish. My solution don't work.
          Only workaround which should work, is to define another datasource with different name and same structure. Than you will point with optionDataSource not to same datasource but another.

          Comment

          Working...
          X