IsNode property on a C1flexGrid (vb6 to vb.net)

Posted by: juan.ome on 15 February 2021, 4:26 am EST

    • Post Options:
    • Link

    Posted 15 February 2021, 4:26 am EST

    Hi,

    We need to know if it is possible to use the Datasource property to fill the grid information and also to be able to use the IsNode property for the creation of nodes, previously this could be achieved in vb6 by assigning the DataMode property in flexDMFree to be able to use the other properties for the creation of nodes without problems, but in .net since this does not exist we are receiving the error “Action not supported in bound mode” for filling the data with Datasource and using IsNode, so far we have only found a solution to fill the grid manually but does not seem like a good alternative for performance reasons

    I attach a small project simulating what we are trying to do.

    Thanks for any information you can give us.

    • Jhoan Valencia
  • Posted 15 February 2021, 4:29 am EST

  • Posted 15 February 2021, 6:14 pm EST

    Hi Jhoan,

    The IsNode property is valid to use in unbound mode only as you are using the Datasource property of FlexGrid so you are using the grid in bound mode.

    Node rows are basically used to show the Aggregates based on similar kind of data present in the cells of the same column, you can use the Subtotal method of the FlexGrid to do the same in bound mode.

    https://www.grapecity.com/componentone/docs/win/online-flexgrid/C1.Win.FlexGrid.5~C1.Win.FlexGrid.C1FlexGridBase~Subtotal(AggregateEnum,Int32,Int32,Int32,Int32,String,AggregateFlags).html

    Regards,

    Prabhat Sharma.

  • Posted 17 February 2021, 1:22 am EST

    What happens is that in the recordset that we use to fill the grid, we have a field that indicates the level that should have the node and thus generate the tree.

    Reviewing the subtotal method I saw that apparently it would not serve in this case, since it creates a node to group the rest but as such I need the row to become the node and assigning the level to it.

    in the node and assigning the level to it, which was easy to do before with IsNode and RowOutlineLevel in vb6, but as you indicate it is only possible if it is not linked to an origin.

    I could generate the expected behavior making an InsertNode and then passing the row information to that new node and then deleting it but it would still not be feasible in this way.

    Could you look at the attached project to see better what you want to try to do and let me know if there is a better solution? thank you very much.

    TreeFlexGrid.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-62d16df1-0704-418a-89c0-dc9f637e8dfe.JPG[/img]

  • Posted 17 February 2021, 11:17 pm EST

    Hello,

    As we told earlier that IsNode property is valid to use in unbound mode only not in Bound mode because Bound mode is meant to reflect the data as it is in the data source. This is why in Bound mode, new rows can be added for nodes.

    As the logic of creating a node can be different on the basis of data so you need to write your custom logic to achieve the result you want.

    The code you shared seems fine to me, if there is any issue that you are getting in achieving your desired result then please let us know.

    Regards,

    Prabhat Sharma.

Need extra support?

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

Learn More

Forum Channels