FlexGrid Editor - Change Editor Property

Posted by: ramirezcleandro on 17 September 2020, 10:03 am EST

    • Post Options:
    • Link

    Posted 17 September 2020, 10:03 am EST

    Hello again, in my last post https://www.grapecity.com/forums/wijmo/flexgrid-custom-editor, you help me adding is ReadOnly property according to the canEdit value. Now I have a column with InputNumber with format : “n2”, Could it possible to change to value to format : “n”, according to the isInteger value from de Data, this is my example.

    https://jsfiddle.net/betbest/u4ptn8jf/4/

  • Posted 18 September 2020, 12:34 am EST

    Hi,

    This may be a little tricky. First, you will need to use the formatItem event to display the amount according to the isInteger value by updating the innerHTML of the cell’s element. Then you will need to handle the prepareCellForEdit event, get the reference of the current cell being edited, get the reference of InputNumber using this cell and update the format of the editor. Please refer to the updated sample link below:

    https://jsfiddle.net/0xk8c19m/9/

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels