Alpha Video Training
Results 1 to 7 of 7

Thread: Group break summary values in a grid: How to align them with its corresponding column

  1. #1
    Member
    Real Name
    javier
    Join Date
    Jul 2012
    Location
    Madrid
    Posts
    147

    Default Group break summary values in a grid: How to align them with its corresponding column

    Hello,
    I have a grid with a group break -> footer that contains summary fields - one for each of the columns included in the grid. I would like to align each summary field with the correspponding column.

    Can I do this?

    I checked the documentation but could not find anything.

    Many thanks,
    Javier

  2. #2
    Member
    Real Name
    Tasos Yerolemides
    Join Date
    Jul 2012
    Posts
    15

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    Hi Javier
    I could do with the anser to your question.
    Was this issue resolved? If so how?

    cheers
    Tasos

  3. #3
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,620

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    it's been a while since I've done this (moved to Lists in V12) but: Below is code from one of my grids with group breaks. The key was to check the "Has Group Header" box, then create the table row with content. I don't remember for sure but I think that last <td> with colspan = "100" was important. So, see if this helps:

    Code:
    <tr>
    	<td class="[class.gridDataHeader]" colspan="{systemcolumnCount}" {group.toggleVisibilityOnClick}>{group.toggleVisibilityIcons}&nbsp;&nbsp; <span id="h_{DOW}"></span> </td>
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]" align="center" > <span id="wt_{DOW}"></span> </td> 
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]">&nbsp;</td>
    	<td class="[class.gridDataHeader]" align="center" > <span id="kcal_{DOW}"></span> </td>
    	<td class="[class.gridDataHeader]" colspan="100" align="left" > &nbsp; </td>
    </tr>
    I'll note that the IDs such as id="kcal_{DOW}" are part of some other extended coding I did to fill each span/break header with the data I wanted. Don't let that get in the way of your first/main question here.
    -Steve


  4. #4
    Member
    Real Name
    javier
    Join Date
    Jul 2012
    Location
    Madrid
    Posts
    147

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    Hello Tasos,
    I could not resolved the issue, other than what Steve is pointing out.
    Javier

  5. #5
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,527

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    I use colspan to handle the line up of my group totals. In my example, I have a group header and footer and both of those are check marked.

    Here is a video: http://screencast.com/t/mrPIt7rlp8w

    Here is my group header code:
    Code:
    <tr>
    	<td class="[class.gridDataHeader]" colspan="100"><p style="margin-top:0;margin-bottom:0;color: #000080;"><b>{JOB_CODE}-{Address}</b>
    	&nbsp;&nbsp;Record(s):&nbsp;{alltrim(str( convert_type([[groupSummary.JOB_CODE.count]],"N") ,250,0,","))}</p>
    	</td>
    </tr>
    Here is my group footer code:
    Code:
    <tr >
    	<td class="[class.gridSummaryData]" colspan="8" ><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>Totals For {alltrim(str( convert_type([[groupSummary.JOB_CODE.count]],"N") ,250,0,","))} Record(s) In Job</b></p>
    	<td class="[class.gridSummaryData]" colspan="1" >
    	<td class="[class.gridSummaryData]" colspan="1"><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>{alltrim(str( convert_type([[groupSummary.TTL_COST.total]],"N") ,250,2,","))}</b></p>
    	<td class="[class.gridSummaryData]" colspan="1"><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>{alltrim(str( convert_type([[groupSummary.CO_PRICE.total]],"N") ,250,2,","))}</b></p>
    	<td class="[class.gridSummaryData]" colspan="1"><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>{alltrim(str( convert_type([[groupSummary.TAX.total]],"N") ,250,2,","))}</b></p>
    	<td class="[class.gridSummaryData]" colspan="1"><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>{alltrim(str( convert_type([[groupSummary.TOTAL.total]],"N") ,250,2,","))}</b></p>
    	<td class="[class.gridSummaryData]" colspan="1"><p style="margin-top:0;margin-bottom:0;color: #000080;text-align: right;"><b>{alltrim(str( convert_type([[groupSummary.DELAY_DAYS.total]],"N") ,250,0,","))}</b></p>
    	</td></td></td></td></td></td></td>
    </tr>
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  6. #6
    Member
    Real Name
    javier
    Join Date
    Jul 2012
    Location
    Madrid
    Posts
    147

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    This is really cool.
    Thanks Carol!!!

  7. #7
    "Certified" Alphaholic TheSmitchell's Avatar
    Real Name
    Sarah
    Join Date
    Apr 2012
    Posts
    1,334

    Default Re: Group break summary values in a grid: How to align them with its corresponding column

    Quote Originally Posted by Steve Workings View Post
    I don't remember for sure but I think that last <td> with colspan = "100" was important.
    I think the colspan is only important if your grid/cell background colors are different from the page color and you want the footer/header to span the entire width of your grid. Things will still work if you don't specify one. You DO have to specify colspan, however, if you want your text to flow nicely across multiple columns & not wrap to, say, the row selector column.

    You just need enough <td> tags (or colspans) to match the number of columns in the data rows. There's usually 1-2 at the beginning for the row selector & status/editing icons and one for the delete checkbox column, if you have these properties enabled. There is also an error column between the editing buttons & your first column of data. But, I would not bother trying to accommodate that column as it only shows up when there's an error in the row and it only applies to that row, not the entire grid.

    The remaining columns in your grid would come from all of your visible columns - think everything that has a column heading or *could* have a column heading but you left blank. Fields that aren't visible don't count - these are the fields with "Hide column" checked. Hidden field types *do* count. Merged Cells only have 1 column - for the Merge Cell Begin element, everything between begin & end will share this column.

    Hope that helps people out.
    Alpha Anywhere latest pre-release

Similar Threads

  1. Summary totals column out of sync with grid
    By lgrupido in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 10-11-2013, 11:24 AM
  2. Summary values don't like Group By
    By gaby_h in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 01-30-2013, 05:54 PM
  3. Action button in grid group break group header
    By Steve Workings in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 10-08-2012, 12:59 AM
  4. Align column headings in grid
    By betty in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-16-2011, 01:16 PM
  5. new cool feature in v11 grid - summary values in Group Headers and Footers
    By Richard Rabins in forum Application Server Version 11 - Web/Browser Applications
    Replies: 8
    Last Post: 09-29-2011, 10:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •