Announcement

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

    Issue with Spinner and dynamically making a column of a list grid editable

    Currently we are using 8.0 LGPL Edition of Smart client. We are going through following two issues.

    1. Issue with Spinner:
    We are using spinner in a dynamic form as below
    isc.DynamicForm.create({
    ID: "newCapacityForm",
    width:"30%",
    fields: [{name:"newCapacity",
    id:"newCapacity",
    title:"Total Capacity",
    width:50,
    editorType:"spinner",
    defaultValue:00
    }
    ]
    });

    here as per requirement, we want to set the min value in javascript based on some condition. bUt i could not find any such property.
    If this is not possible, can we disable the down arrow of spinner.

    2. We have a list grid with some columns. on run time we want to make one of the columns as editable based on some condition.
    isc.ListGrid.create({
    ID: "datastoreDetail",
    headerHeight: 20,
    showEmptyMessage: true,
    alternateRecordStyles:false,
    border:"1px solid GREY",
    data:lnsData,
    fields:[

    {name:"Name", title:"Name"},
    {name:"Id", title:"Id"},
    {name:"salary", title:"Salary"},
    {name:"status", title:"Status"}
    ]
    });

    based on some operation on the page, we want to make the salary field as editable with spinner.

    Please help me out with above two issues.

    Thanks in advance

    #2
    1. min/max are the spinner properties
    2. override LG.canEditCell() and determine which column(s) to allow editing based on whatever conditions you have.

    Comment


      #3
      Thanks davidj6 for your reply.
      1. Actually i tried to set min in javascript but it is not working.
      newCapacityForm.setMin((+capacity));

      here the capacity is a var coming after some calculation being done.
      But it gives object doesn't support this property.
      can you please give some example for this.

      2. I will try and see if it works

      Thanks

      Comment


        #4
        1. Just set newCapacityForm.min to the new value.

        Comment


          #5
          Thanks davidj6 for your response ...
          i tried as you suggested but this is also not working though its not giving any error but it is not setting the min value as i am able to reduce the value below the value of capacity

          Comment

          Working...
          X