Announcement

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

    SmartClient GridPortlet doesn't work with DynamicForm. / SmartClient_v120p_2019-12-12_Evaluation

    I tried to use a dynamic form in the portlet.
    The date button and listbox don't work.

    Below the source code.
    Is it a bug or there is something wrong with the code below ?
    Could you help ?


    isc.ListPalette.create({
    ID: "listPalette",
    width: 150,
    leaveScrollbarGap: false,

    fields: [
    {name: "title", title: "DataSource Name"}
    ],

    // specify paletteNodes that will create ListGrids bound to specific DataSources
    data: [{
    title: "Animals",
    type: "ListGrid",
    defaults: {
    dataSource: "animals",
    autoFetchData: true,
    showFilterEditor: true
    }
    },{
    title: "Supply Categories",
    type: "ListGrid",
    defaults: {
    dataSource: "supplyCategory",
    autoFetchData: true,
    showFilterEditor: true
    }
    },{
    title: "Supply Items",
    type: "ListGrid",
    defaults: {
    dataSource: "supplyItem",
    autoFetchData: true,
    showFilterEditor: true
    }
    },{
    title: "Edit Form",
    type: "DynamicForm",
    defaults:{
    autoDraw:false,
    dataSource:"supplyItem",
    useAllDataSourceFields:true,
    fields: [{name:"savebtn", editorType:"ButtonItem", align:"center", width:100, colSpan:4, title:"Save Item", click:"alert(1)"}],
    width:650,
    numCols:4,
    colWidths:[80,200,100,200],
    margin:5,
    cellPadding:5,
    autoFocus:false
    }
    }]
    });


    #2
    As noted in the sample description, Grid Portlets uses editMode to show the grid samples. In editMode some components, like DynamicForms, are limited to provide editMode features rather than normal application interactions. This is what you are seeing with your change.

    To test using a DynamicForm within a Portlet without editMode enabled, try the Portal Layout sample instead. There you should find your field interactions in the form work as expected.

    Comment


      #3
      Hi All,

      Could you help.

      Working with portal grid, I tried to synchronize the category list with the content of the item list.
      In order to achieve the implementation a add a function in the definition of the category grid as follow.
      highlighted in red.

      It 's working fine.
      But after a click on the button "destroy & recreate" , it lost the handler . the grids category and item are not synchronize any more.




      isc.ListPalette.create({
      ID: "listPalette",
      width: 150,
      leaveScrollbarGap: false,

      fields: [
      {name: "title", title: "DataSource Name"}
      ],

      // specify paletteNodes that will create ListGrids bound to specific DataSources
      data: [{
      ID:"Category",
      title: "Supply Categories",
      type: "ListGrid",
      defaults: {
      dataSource: "supplyCategory",
      autoFetchData: true,
      showFilterEditor: true,
      recordClick: function (grid, record, rowNum){
      if (typeof Item != "undefined")
      {
      Item.fetchRelatedData(record, this);
      }
      }
      }
      },{
      ID: "Item",
      title: "Supply Items",
      type: "ListGrid",
      defaults: {
      dataSource: "supplyItem",
      autoFetchData: true,
      showFilterEditor: true
      }
      }]
      });
      Last edited by rsaya; 9 Jan 2020, 13:37.

      Comment

      Working...
      X