Author Topic: Check for null cell change in batch editing  (Read 204 times)

luckduck

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 41
    • View Profile
Check for null cell change in batch editing
« on: November 17, 2020, 01:12:21 pm »
If you double-click an empty cell without a value (editing begin) and then enter or move to another cell (editing end), it is recognized as changed even though there is no changed value.

https://paramquery.com/pro/demos/editing_batch


1. Add one blank cell in the batch editing demo above
Code: [Select]
                {
                    title: "Unit Price", width: 100, dataType: "float", dataIndx: "UnitPrice",
                    validations: [{ type: 'gt', value: 0.5, msg: "should be > 0.5" }],
                    render: function (ui) {
                        var cellData = ui.cellData;
                        if (cellData != null) {
                            return "$" + parseFloat(ui.cellData).toFixed(2);
                        }
                        else {
                            return "";
                        }
                    }
                },
                {
                    title: "TEST", width: 100
                },

2. Test cell double click

3. Click Enter or Tap or click elsewhere

4. There is no change in the value of the test cell, but it is displayed as changed.

How do I mark it as unchanged?

Thank you.



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4960
    • View Profile
Re: Check for null cell change in batch editing
« Reply #1 on: November 17, 2020, 01:36:28 pm »
[ Only Pro members may read this post. ]
« Last Edit: November 17, 2020, 01:42:53 pm by paramvir »

luckduck

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Check for null cell change in batch editing
« Reply #2 on: November 18, 2020, 07:03:30 am »
Thank you.

I applied the source but it is the same as before.


https://jsfiddle.net/kgfp5vs4/

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4960
    • View Profile
Re: Check for null cell change in batch editing
« Reply #3 on: November 18, 2020, 10:25:58 am »
[ Only Pro members may read this post. ]