Announcement

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

    DetailViewer should understad displayfield attibute.

    Hi,

    I am populating combo boxes to show values from DB when I need to create/update record and I am using same DataSource for ListGrid. ListGrid is smart enough to use displayField attribute while showing record and populates the exact record matching to primary key of original datasource but when I click same record to show in detailViewer I see actual primary key.

    Below is DataSource portion to populate

    isc.RestDataSource.create( {
    ID :"XXXXX",
    .....
    .....

    fields : [
    {
    name :"empid", // listgrid automatically map this to valueField but detailViewer not.
    title :"EmpName",
    valueField :"id",
    displayField :"name",
    optionDataSource :"YYYYY"
    }

    Using below code to set record for detailViewer.

    var record = this.getSelectedRecord();
    detailViewer.setData(record);


    I was told on forum that DetailViewer do not support displayField. I believe it should support this so that listgrid and detailviewer can be used together without writing custom code.

    Thanks,
    Ashish.

    #2
    DetailViewer optionDataSource and displayField

    I would second this request. This seems like a core missing piece for DetailViewer that many of the other components support. It makes it more difficult to use DetailViewer with the other components.

    Comment


      #3
      It's scheduled. To get it accelerated, buy support.

      Comment


        #4
        I'm adding my name to the list of those that expected this to be the default behavior for a DetailViewer. I have purchased support so hopefully this will move up in the queue.

        In the meantime, can you reply with sample code showing the recommended technique for adding this behavior?

        Thanks

        Comment


          #5
          Just use an implementation of formatCellValue to look at the other field's value (you are passed a record).

          Comment

          Working...
          X