Announcement

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

    datetime column not retriving value if the value is null

    Dear Team

    We are using SC11.0p

    The below code scenario is not retriving the null value.


    I have a list grid with 3 columns A1, A2 and A3 as follows.

    <field name="A1" type="text" />
    <field name="A2" type="datetime" />
    <field name="A3" type="text" />

    In the list grid we have a functionality to refresh a single row for which we have written the below code.

    isc.DataSource.get(listGridID.dataSource).fetchData({"A1":listGridID.getSelectedRecord()["A1"]},
    function(dsResponse,data,dsRequest)
    {
    if(data){
    var rowNum = listGridID.getRowNum(listGridID.getSelectedRecord());
    isc.addProperties(listGridID.getRecord(rowNum), data[0]);
    listGridID.refreshRow(rowNum);
    }
    });

    Refresh record is working properly for A3 column but for A2 column if the value is set as NULL then in the callback i.e., data[0] the column A3 is not at all coming.
    Because of which the column A3 column value is not getting set to NULL in the User Interface.
    Please suggest what can be done in this regard.


    #2
    Hi sathish.gdis,

    I'd read these docs (part "Updates and Automatic Cache Synchronization"). If you send the updated-fetched data as if it were the result of an update request, all GUI updates will be handled automatically for you.
    Just use a special operationBinding and change the type of the fetch-DSResponse to "update" on the server and set affected rows = 1.

    Best regards
    Blama

    Comment


      #3
      Dears,

      I am getting the updated value for the column A3 but not for A2 column only when its null its not in the resultant data.
      And if its not null then I am getting the updated value.

      Please suggest on this.

      Thanks and Regards.

      Comment


        #4
        You can readily verify that assigning annual to a record will result in the expected refresh. Your problem is that data[0] does not contain a null for the datetime value - it's just undefined (no such property). Correct this and the refresh will occur as expected.

        Comment


          #5
          In data[0], I have A3 with Value and A1 with Value but A2 isnt present at all. At least it should be there as A2 with undefined so that I can know that its having null value.
          Please suggest why doesnt data[0] doesnt even hold columns which have null as their values. ( I dont know about other types of columns but I have observed this behaviour for datetime type of column)

          Comment


            #6
            We have no way of knowing why that value would be null vs undefined. We don't have your DataSource, don't know whether you're using our SQL or Hibernate connectors or something else, have custom logic, etc.

            Let us know if you find something that suggests a framework issue in this area.

            Comment

            Working...
            X