Grouping in the Spread

Posted by: himaheshh on 8 September 2017, 1:53 pm EST

  • Posted 8 September 2017, 1:53 pm EST

    Hi,


    I am trying to display information as shown below....Is it possible using the Spread for Winforms?


    <SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-AU;mso-fareast-language:EN-AU;mso-bidi-language:AR-SA;"> <SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-AU;mso-fareast-language:EN-AU;mso-bidi-language:AR-SA;"> Step: 1 - The grid is grouped so that the Monthly break up and the weekly break up below the yearly data is hidden.



    <TABLE class="" style="WIDTH:547pt;BORDER-COLLAPSE:collapse;" cellSpacing=0 cellPadding=0>










    <TR style="HEIGHT:12.75pt;">
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext 0.5pt solid;WIDTH:48pt;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl26"> </TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:95pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Number</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:84pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Name</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:50pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Period</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:24pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Age</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:62pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Base Salary</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">HRA</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Allowance</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:58pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Deductions</TD></TR>
    <TR style="HEIGHT:15pt;">
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:15pt;BACKGROUND-COLOR:transparent;" class="xl27"><FONT size=3>+</FONT></TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">John</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">Year 2008</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">30</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12345</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1234</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">123</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12</TD></TR></TABLE>


    </SPAN> Step: 2 - When the "+" sign in the Yearly data row is expanded, the monthly break up should be displayed as below



    <TABLE class="" style="WIDTH:547pt;BORDER-COLLAPSE:collapse;" cellSpacing=0 cellPadding=0>










    <TR style="HEIGHT:12.75pt;">
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext 0.5pt solid;WIDTH:48pt;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl27"> </TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:95pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Number</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:84pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Name</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:50pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Period</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:24pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Age</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:62pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Base Salary</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">HRA</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Allowance</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:58pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Deductions</TD></TR>
    <TR style="HEIGHT:15pt;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:15pt;BACKGROUND-COLOR:transparent;" class="xl28"><FONT size=3>-</FONT></TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">John</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">Year 2008</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">30</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12345</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1234</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">123</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12</TD></TR>
    <TR style="HEIGHT:15pt;mso-outline-level:1;">
    <TD class=xl29 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:15pt;BACKGROUND-COLOR:transparent;" class="xl29"><FONT size=3>+</FONT></TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" class="xl26">John</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" class="xl26">Month1</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">30</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1028.75</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">102.8333333</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">10.25</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1</TD></TR></TABLE>


     Step: 3 - When the "+" sign in the Monthly row is expanded, the weekly row should get displayed...


     
    <TABLE class="" style="WIDTH:547pt;BORDER-COLLAPSE:collapse;" cellSpacing=0 cellPadding=0>










    <TR style="HEIGHT:12.75pt;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext 0.5pt solid;WIDTH:48pt;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl28"> </TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:95pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Number</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:84pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Employee Name</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:50pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Period</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:24pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Age</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:62pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Base Salary</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">HRA</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:63pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Allowance</TD>
    <TD class=xl24 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext 0.5pt solid;BORDER-LEFT:windowtext;WIDTH:58pt;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffcc99;" class="xl24">Deductions</TD></TR>
    <TR style="HEIGHT:15pt;">
    <TD class=xl29 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:15pt;BACKGROUND-COLOR:transparent;" class="xl29"><FONT size=3>-</FONT></TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">John</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" class="xl25">Year 2008</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">30</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12345</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">1234</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">123</TD>
    <TD class=xl25 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ccffcc;" align=right class="xl25">12</TD></TR>
    <TR style="HEIGHT:15pt;mso-outline-level:1;">
    <TD class=xl30 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:15pt;BACKGROUND-COLOR:transparent;" class="xl30"><FONT size=3>-</FONT></TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" class="xl26">John</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" class="xl26">Month1</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">30</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1028.75</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">102.8333333</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">10.25</TD>
    <TD class=xl26 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#ffff99;" align=right class="xl26">1</TD></TR>
    <TR style="HEIGHT:12.75pt;mso-outline-level:2;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl28"> </TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">1</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">John</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">Week1</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">30</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">51.4375</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">5.15</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.854166667</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.05</TD></TR>
    <TR style="HEIGHT:12.75pt;mso-outline-level:2;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl28"> </TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">1</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">John</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">Week2</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">30</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">51.4375</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">5.15</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.854166667</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.05</TD></TR>
    <TR style="HEIGHT:12.75pt;mso-outline-level:2;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl28"> </TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">1</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">John</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">Week3</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">30</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">51.4375</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">5.15</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.854166667</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.05</TD></TR>
    <TR style="HEIGHT:12.75pt;mso-outline-level:2;">
    <TD class=xl28 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext 0.5pt solid;BORDER-BOTTOM:windowtext 0.5pt solid;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;" class="xl28"> </TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">1</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">John</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" class="xl27">Week4</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">30</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">51.4375</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">5.15</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.854166667</TD>
    <TD class=xl27 style="BORDER-RIGHT:windowtext 0.5pt solid;BORDER-TOP:windowtext;BORDER-LEFT:windowtext;BORDER-BOTTOM:windowtext 0.5pt solid;BACKGROUND-COLOR:#cc99ff;" align=right class="xl27">0.05</TD></TR></TABLE>


     


    Thank you!


     


    Regards


    Mahesh

    </SPAN>
  • Replied 8 September 2017, 1:53 pm EST

    Mahesh,

    Yes it can be achieved using the Spread control. Please take a look at the HierarchyVB or HierarchyCS sample project which gets installed with the Spread control. You may locate it at the following location in your machine:

    <b> C:\Program Files\FarPoint Technologies\Spread.WinForms.4.dotNet20\v4.0.2009\Samples</b>

    Thanks

  • Replied 8 September 2017, 1:53 pm EST

    Thanks Suresh!


    It helped me a lot and saved me lots of time too..


    Couple of questions one this,


    1. Is it possible to Expand or collapse all the views (both parent and child) on a button click?


    2. Vertical Scroll bar.. I am not very happy with the way the scroll bars work in this scenario. If I scroll down, it takes me to the bottom rows..What if I want to scroll row by row?


     Regards


    Mahesh

  • Replied 8 September 2017, 1:53 pm EST

     


    Hello Mahesh,


    To Expand all the views you can use the following code:

    <FONT color=#0000ff size=2><FONT color=#0000ff size=2>

    Private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Sub</FONT></FONT><FONT size=2> Button1_Click(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> sender </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> System.Object, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> e </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> System.EventArgs) </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Handles</FONT></FONT><FONT size=2> Button1.Click


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> i </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Integer

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>For</FONT></FONT><FONT size=2> i = 0 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>To</FONT></FONT><FONT size=2> fpSpread1.ActiveSheet.Rows.Count - 1


    FpSpread1.ActiveSheet.ExpandRow(i, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</FONT></FONT><FONT size=2>)


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> CV </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> FarPoint.Win.Spread.SheetView = FpSpread1.ActiveSheet.GetChildView(i, 0)


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>If</FONT></FONT><FONT size=2> CV </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>IsNot</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Nothing</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Then

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>For</FONT></FONT><FONT size=2> j </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Integer</FONT></FONT><FONT size=2> = 0 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>To</FONT></FONT><FONT size=2> CV.Rows.Count - 1


    CV.ExpandRow(j, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</FONT></FONT><FONT size=2>)


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Next

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>If

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Next

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Sub</FONT></FONT>


    <FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#000000>Change "<FONT color=#0000ff>True</FONT>" to  "<FONT color=#0000ff>False</FONT>" in the same code to collapse expanded views.</FONT></FONT></FONT>


    I did check the scroll behavior of the Vertical Scroll bar using the Sample discussed earlier by Suresh with the latest release of Spread for Windows, and found that every child grid has it's own vertical scroll bar. When we have expanded view, if we click on vertcal scroll button for the parent grid or child grid, it is moving Row by Row.


    Let me know if you have further questions.


    Regards,


     


     


    <FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#000000></FONT> 

    </FONT></FONT>
  • Replied 8 September 2017, 1:53 pm EST

    Thanks Deepak!


    I have another question, When you have n nunmber of child views(grids) as in my earlier example, is it possible to set the indent to zero so that all the child views appear(start) from the same point horizontally?


    I am still working on the layouts, so couldnt provide you an scenario where the scroll bar is an issue. I will get back to you on that.


    Thanks a lot!


     Regards


    Mahesh

  • Replied 8 September 2017, 1:53 pm EST

     


    Hello Mahesh,


    Currently horizontal indention for child views is not supported.Refer to <FONT color=#0000ff>thread</FONT> , for more information on it.


     


    Thanks,


     

Need extra support?

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

Learn More

Forum Channels