Announcement

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

    Default value not loaded in the listgrid during edit mode

    Im using SmartClient 8.3 power edition. The default value for a datasourcefield is not loaded while it is in edit mode. It displays empty. The values for that specific field is based on another field 'nodeTypeId' (Dependent select).

    <field name="nodeTypeId" title="Node Type" type="CustomSelectItem" length="50" width="150" optionDataSource="comboNodeTypeForNodeProfile" showHover ="true" displayField="name" valueField="nodeTypeId"/>

    <field name="primarySoftware" showHover ="true" title="Primary Software*" width="120" type="CustomSelectItem" optionDataSource="comboSoftwareForNodeProfile" displayField="label" valueField="value" required="true" exportData="true">
    <getPickListFilterCriteria>
    <JS>
    function() {
    if(this.form != null &amp;&amp; this.form.getField('nodeTypeId') != null){
    var nodeTypeId = this.form.getField('nodeTypeId').getValue();
    return {nodeTypeId: '' + nodeTypeId};
    }
    }
    </JS>
    </getPickListFilterCriteria>
    </field>

    #2
    If by "edit mode" you mean ListGrid inline editing, you getPickListCriteria function is not going to be active in that mode at all, because it would need to be under listGridField.editorProperties.

    In general, sticking UI component properties in your DataSource definition is a hack - these properties are not documented there.

    Comment


      #3
      Default value not loaded in the listgrid during edit mode

      I just pasted that code to explain that the primarySoftware field is displayed based on the nodeType field. My problems is when i change the nodeType, the primarySoftware corresponding to that type is loaded but it not reflected dynamically i.e the display value doesnt get updated based on the change

      Comment

      Working...
      X