FLEXGRID add new row

Posted by: alex.corti on 8 July 2021, 12:56 pm EST

    • Post Options:
    • Link

    Posted 8 July 2021, 12:56 pm EST

    Hi to everyone,

    I have a strange behavior. I’m using FlexGrid to show/edit data contained into my SQL table using a filtered query.

    I have set _fgTable.AllowAddNew = true

    If the query returns empty dataset I don’t see any rows (I think it’s correct).

    But when I want to add new one, but I can’t because the grid doesn’t allow me to edit the empty new row

    See “Add_Ko.PNG” image to see this beahavior.

    I expected blank row as you can see in “Add_Ok.PNG” image

    Thanks Alex

  • Posted 9 July 2021, 2:28 am EST

    Hi Alex,

    We do not face this issue at our end. Please refer to the sample attached. Could you please share a sample replicating the issue and the version of C1 you are using?

    Regards

    Avnish

    FlexGridEmpty.zip

  • Posted 9 July 2021, 3:10 am EST

    Hi Avnish,

    I will analyze your code and I will give you a feedback

    Thanks Alex

  • Posted 9 July 2021, 3:31 am EST

    Hi Avnish,

    thanks for your example, it works, but there are difference with my one.

    1. I’m using .net core library (4.5.20211.492) and not framework one.
    2. I’m using SQL server DB and not Access.
    3. I’m using flexGRid into UserControl instead of form and I used only code to manage it (project view is not work into .net core)

    I attached the cs file of my use control

    You have to see this function “loadFromQuery”

    Thanks for you help

    Alex

    ctrlTable.zip

  • Posted 12 July 2021, 4:44 am EST

    Hi Alex,

    We tried replicating the issue at our end but could not. Please refer to the sample attached. The cause that we can think of for this issue is that you are assigning an empty data table to the flexgrid that results in a grid with no columns. Could you please check that when you face this issue, the DataTable that is being assigned to the flexgrid has columns and let us know? Please refer to the sample attached.

    Regards.

    Avnish

    FlexAddNew.zip

  • Posted 14 July 2021, 5:11 am EST

    Hi Avnish,

    thanks for your tip.

    Now I understand my error and solved it.

    Alex

Need extra support?

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

Learn More

Forum Channels