Hierarchical Grid (based on C1GridView) looses Visual Style info when bound to a data source that do

Posted by: hirom on 10 September 2017, 11:38 am EST

  • Posted 10 September 2017, 11:38 am EST

    Hi.

    We are using the sample code (HierarchicalGrid.cs) from ComtrolExplorer project to create a Hierarchical DataGrid.

    The Hierarchical Grid is based on (C1GridView 2011v1) latest release. Whenever, the parent grid is bound to a data source that does not contain any records. The Grid looses the Visual Style information.

    We have tried to set the EmptyDataTemplate property but the Hierarchical Grid ignores them.

    Do you have any workaround for this issues?

  • Replied 10 September 2017, 11:38 am EST

    >> We have tried to set the EmptyDataTemplate property but the Hierarchical Grid ignores them.


    Add the following check into HierarchyGridItem.Render:


    ...


    if (RowType == C1GridViewRowType.DataRow)


    {


    ...


    }


    if (RowType == C1GridViewRowType.EmptyDataRow)


    {


       base.Render(writer);


    }


    >> The Grid looses the Visual Style information.


    You need to either put an empty C1GridView to the page with the same name of VisualStyle:


     


     


    or use local VisualStyle.

Need extra support?

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

Learn More

Forum Channels