FlexGrid Checkbox Issue

Posted by: ramirezcleandro on 13 February 2021, 10:12 am EST

    • Post Options:
    • Link

    Posted 13 February 2021, 10:12 am EST

    Hello dear support.

    I have an issue using checkbox inside in flexgrid. In my example below, I have two flexgrid, one called, grid1 and grid2 with the same ItemSource, the functionaly is following, The user click in the edit button and view the grid2 , the user add data in the grid and press save, after that, the user view the grid1, the issue here is in the javascript and set a false value, and in the grid1, in the column “Aplica” the Flexgrid is showing the word false, and I think must be a checkbox. here is the example.

    https://jsfiddle.net/betbest/5p7L80ha/32/

    Then, the same funcionality, with dataFake initializate in the grid1, all work fines. Here is the example.

    https://jsfiddle.net/betbest/w68yus1v/3/

    Could you help me please, maybe I am doing something bad.

  • Posted 15 February 2021, 10:08 pm EST

    Hi Leandro,

    The issue in the first sample occurs because no data source is set is to the FlexGrid so the grid is unable to get the data type of the columns. So, it sets the dataType to undefined for all the columns. Once you add a new item to the grid, the dataType of each column is set to Object. So, the boolean values are displayed as string.

    This does not happen in the second sample because some initial data is already set and the grid can infer the data types using this data source.

    To resolve this issue, you can set the dataType of the column manually:

    { binding: 'Aplica', header: 'Aplicar', width: 80, align: "center", dataType: wijmo.DataType.Boolean }
    

    Let me know if this helps.

    Regards,

    Ashwin

    PS: Please post all the queries related to Wijmo on Wijmo’s forum:

    https://www.grapecity.com/forums/wijmo

  • Posted 17 February 2021, 2:44 am EST

    It is working, thanks very Much.

Need extra support?

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

Learn More

Forum Channels