
xjgs_xhj@163.com
Top achievements
Rank 1
xjgs_xhj@163.com
asked on 04 Dec 2010, 03:25 PM
Version 2010.3
In the GridView/self-referencing WinForms VB.NET demo sample,how to:
1.To get sum(Size) of "RadControls for Winforms", "RadControls for Silverlight", "RadControls for WPF" and "RadControls for ASP.NET AJAX", then write the Sum(Size) to Size cell of "Telerik RadControls".
2.To get sum(Size) of "bin" and "READEME.txt", then write the Sum(Size) to Size cell of "Visual Studio 2010".
3.To get sum(Size) of "Visual Studio 2010" and "Telerik RadControls" ,then write the Sum(Size) to Size cell of "Program Files".
4.And so on...
5.When any Size cell of a child changed,an event trigger and update it's parent /grantparent Size cell.
Best Regards.
5 Answers, 1 is accepted
0

Richard Slade
Top achievements
Rank 2
answered on 04 Dec 2010, 07:35 PM
Hello,
I'm afraid I don't understand your issue or requirement. Please could you provide a sample, further details and any supporting screenshots that may help me to assist you.
Thanks
Richard
I'm afraid I don't understand your issue or requirement. Please could you provide a sample, further details and any supporting screenshots that may help me to assist you.
Thanks
Richard
0

xjgs_xhj@163.com
Top achievements
Rank 1
answered on 09 Dec 2010, 09:31 AM
Here's a screenshot of it.After changing "RadControls for Winforms" Size from "101MB" to "200MB","Telerik RadControls" Size and "Program Files" Size change by adding "99MB".
Best Regards.
Best Regards.
0
Hello,
The FolderTree example of RadGridView is created to demonstrate the self-reference hierarchy functionality of the control. Its data is created in the example and the Size values are quite random. When you create a self-reference hierarchy with real data, its values will be consistent.
I hope it helps.
Best regards,
Alexander
the Telerik team
The FolderTree example of RadGridView is created to demonstrate the self-reference hierarchy functionality of the control. Its data is created in the example and the Size values are quite random. When you create a self-reference hierarchy with real data, its values will be consistent.
I hope it helps.
Best regards,
Alexander
the Telerik team
0

xjgs_xhj@163.com
Top achievements
Rank 1
answered on 09 Dec 2010, 05:54 PM
" The FolderTree example of RadGridView is created to demonstrate the self-reference hierarchy functionality of the control. Its data is created in the example and the Size values are quite random. When you create a self-reference hierarchy with real data, its values will be consistent."
I know that.What I really want is a scenario enhancing this example:
1.Auto-caculate Size summary(named as 'Sum1') of "RadControls for Winforms", "RadControls for Silverlight", "RadControls for WPF" and "RadControls for ASP.NET AJAX"(children rows),then auto-update Size value of "RadControls for Winforms"(parent row) with 'Sum1' value .
2.....
3.Auto-caculate Size summary(named as 'Sum2') of "Visual Studio 2010" and "Telerik RadControls"(children rows),then auto-update Size value of "Program Files"(parent row) with 'Sum2' value.
4.....
Best Regards.
I know that.What I really want is a scenario enhancing this example:
1.Auto-caculate Size summary(named as 'Sum1') of "RadControls for Winforms", "RadControls for Silverlight", "RadControls for WPF" and "RadControls for ASP.NET AJAX"(children rows),then auto-update Size value of "RadControls for Winforms"(parent row) with 'Sum1' value .
2.....
3.Auto-caculate Size summary(named as 'Sum2') of "Visual Studio 2010" and "Telerik RadControls"(children rows),then auto-update Size value of "Program Files"(parent row) with 'Sum2' value.
4.....
Best Regards.
0
Hello,
Currently, summary rows can be added only on root level of a self-reference hierarchy. To achieve your scenario, you can calculate the sum of the child rows sizes and add this summary to the text of the parent row 'Size' cell. In the 'FolderTree' example you can add the following code to the CellFormatting event handler:
I hope it helps.
Best regards,
Alexander
the Telerik team
Currently, summary rows can be added only on root level of a self-reference hierarchy. To achieve your scenario, you can calculate the sum of the child rows sizes and add this summary to the text of the parent row 'Size' cell. In the 'FolderTree' example you can add the following code to the CellFormatting event handler:
GridDataCellElement dataCell = e.CellElement
as
GridDataCellElement;
if
(dataCell.ColumnInfo.Name ==
"Size"
&& dataCell.RowInfo.ChildRows.Count > 0)
{
int
totalSize = 0;
foreach
(GridViewRowInfo childRow
in
dataCell.RowInfo.ChildRows)
{
totalSize += (
int
)childRow.Cells[
"Size"
].Value;
}
dataCell.Text = dataCell.Value +
" MB; TotalSize: "
+ totalSize +
" MB"
;
}
I hope it helps.
Best regards,
Alexander
the Telerik team
Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.