Hi,
I have hierarchical data grid with multiple children.
I easily set their SummaryColumnRow with this code for each child
SummaryRow sr = band.Behaviors.CreateBehavior(); sr.SummariesCssClass = "summaryRow"; //sr.ShowSummariesButtons = false; //to disable the buttons in header sr.ColumnSummaries.Add(csi); /csi is ColumnSummaryInfo
but the problem when i tried to set the rootTable behavior, it doesn't work
SummaryRow sr = hierarchialGrid.Behaviors.CreateBehavior(); //hierarchialGrid is grid obj in aspx hierarchialGrid.Behaviors.SummaryRow.Enabled = true; sr.SummariesCssClass = "summaryRow"; sr.ColumnSummaries.Add(csi);
here is .aspx:
<ig:WebHierarchicalDataGrid ID="hierarchialGrid" runat="server" Width="100%" EnableAjax="true" HeaderCaptionCssClass="headerCSS"> <ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="400" SlideCloseDirection="Auto" SlideCloseDuration="400" /> </ig:WebHierarchicalDataGrid>
and i'm binding data in pageLoad
hierarchialGrid.DataSource = getDataSet(); hierarchialGrid.DataBind();
//setting summary info here
hierarchi is as follows, and i'm setting summary footer for [Customers]
[Customers] > [Orders]> [Order Details]
The problem is only with the root Table/node.
I'm new to Infragistics & .net
please guide if i'm missing something.
Hi Muhammad,
You have to refer the root band of the grid as hierarchialGrid.GridView, i.e. you can use something like the following code:
hierarchialGrid.GridView.Behaviors.CreateBehavior<SummaryRow>();
hierarchialGrid.GridView.Behaviors.SummaryRow.ColumnSummaries.Add(new ColumnSummaryInfo() { ColumnKey = "Id" });
I hope this solution works for you. Please, contact me in case that you need more information.
Thanks,
I am migrating from UltraWebGrid to WebHierarchicalDataGrid. The problem I am facing in migration is, UltraWebGrid dosent do postback on click on expand button but WebHierarchicalDataGrid is doing a postback/Ajax call. I dont want post back on lick of expand button of WebHierarchicalDataGrid, please advice.
Ahmed Shaik