Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • slick07
    replied
    Originally posted by Isomorphic View Post
    #1 again, we keep saying this: we're not going to clip the printed output
    OK... but the content for the hierarchical column of TreeGrids gets clipped... Is this an exception or a bug? If this is an exception is there a solution to make it have a reasonable size?

    Leave a comment:


  • Isomorphic
    replied
    Taller as in setHeight(bigger). Tall enough so that all rows can be seen without scrolling, if that's what you want.

    And if that doesn't work, we have already provided multiple other solution above already, and they are not what you listed as "viable solutions" - those are wrong - so re-read.

    Overall, we've given you several ways to solve this, but it's just taking too many repetitions, this is not the first thread we've had with you where we've spent a lot of time reiterating the correct solution, and as far as we can tell, you've never bought a license and don't have support. So, sorry, we have to cut this off - please buy support if you need help like this.

    Leave a comment:


  • slick07
    replied
    What do you mean taller? The screen is limited and there might be several hundreds or rows... Printing with the browser is a no go! I need to have access to all the rows of the table even to those beyond the visible area.

    Going through the subelements and using getInnerHTML() for each one seems complicated and not a good idea...

    Hence the only viable solutions are: 1) either using getPrintHTML() if we manage to overcome the existing issues or 2) generate a html similar with the one provided by getPrintHTML(). For case 2) can I find anywhere how are you generating that html code so I do not have to reinvent the wheel?

    Leave a comment:


  • Isomorphic
    replied
    As we said:

    ... the TreeGrid per se is just a container for the header, body and other elements.
    If you wanted the HTML, it's there - it's still getInnerHTML(), just on the body. But that gets you just the body piece, then you need the header, which has more subelements (each individual header is a button).

    But we've already explained that this isn't necessary.. perhaps you haven't realized.. if you want to show more rows, you can just make the TreeGrid taller :)

    Leave a comment:


  • slick07
    replied
    I do not even know what path I am taking... All I know is that following your Feature Sponsorship suggestion I received from Isomorphic support the indication: "you probably just wanted the non-print HTML". Hence I am trying to see if I can use that solution. And I thought that I should try to use getInnerHTML() but bumped into a " "...

    Printing as such with the browser print function does not work because the browser prints just what it is on the screen and not the entire content of the TreeGrid (maybe hundreds of rows). You say "you probably want to print the grid's normal HTML, not its print HTML". How can I get that normal HTML to see if it satisfies my needs?

    I shall explain again what I need: the entire content of a TreeGrid - all the rows with a constant height, the column header with a given height and all visible columns in the same order and with the same widths as they appear. Even if the cell content gets clipped this is not a problem. We are using this printing solution for several years within our desktop client and all the customers are ok with that. We are trying to get the same behaviour over the web interface... I understand that SmartGWT will NOT do clipping but I need that...

    Leave a comment:


  • Isomorphic
    replied
    Yes, because the TreeGrid per se is just a container for the header, body and other elements.

    Also, it sounds like you plan to use the normal (non-print) rendering of the TreeGrid, and if so, you may be headed down the wrong path. If you want to print the TreeGrid as it is, just put it on the screen and trigger the browser’s print function.

    You don’t need to grab pieces of HTML from it and put them somewhere else - you can just print the TreeGrid as such. If there are other components where you want their printed version instead, call getPrintHTML() on those, and then combine that (inside a Canvas) into a VLayout with the TreeGrid.
    Last edited by Isomorphic; 16 Oct 2020, 09:32.

    Leave a comment:


  • slick07
    replied
    It may be a dummy question but should getInnerHTML() method for a TreeGrid return just " " ?

    Leave a comment:


  • Isomorphic
    replied
    Start [URL=https://www.smartclient.com/services/#features] - there's a link to send an email. Go ahead and refer to this thread for background, but try to capture the precise feature you want as well.

    Leave a comment:


  • slick07
    replied
    I do not exclude the idea of a Feature Sponsorship. How do I get a price quote?

    Leave a comment:


  • Isomorphic
    replied
    #1 this is getting silly, but for the 4th time we need to bring up clipping. For absolute clarity, here we are talking about clipping of column values, that is, say a column value is "Fred" and you make the column width very small, so only "Fr" is actually shown - that's clipping.

    Clipping is the only way you can control column widths in the presence of values of unknown size. Clipping is basically never desired in a printout, for the obvious reason that once you are holding a sheet of paper, you can no longer resize the column to see the rest of the value. So one of the primary points of our printed HTML is to remove clipping.

    If your use case is weird enough that you actually want clipping, then you probably want to print the grid's normal HTML, not its print HTML. You can combine the normal HTML for components with the printed HTML for other components by just calling getPrintHTML() on some and getInnerHTML() on others.

    If you don't want clipping, then there is no clear definition of "keeping the column widths" because you can set whatever widths you want for an HTML table, and in the absence of clipping, the browser is just going to do whatever it wants when values are too big for your specified sizes. The heuristics differ by browser, by platform, by font and other factors and you will not get any kind of consistent output.

    If what you really want is something like auto-sizing, then you can accomplish that by setting a small overall table width and telling all columns to not wrap. That's an easy enough modification of our printed HTML, or you could use the normal HTML after telling all columns to autosize.

    #2 so again we'd recommend just making sure the title column is included if you want the larger height, which you probably want anyway.

    As far as what's going on, while that extra padding isn't intended, it doesn't rise to the standard of something that can be called "a bug": we don't aim for any particular size for printed output, and nothing is misaligned, unreadable or anything like that. So in terms of trying to file a bug, there's no feature we can point to and say: "this doesn't work as documented".

    To get a change here, you'd need a Feature Sponsorship to add new framework properties that attempt to control sizing (in a limited way and with caveats) for the printed output. But based on the discussion above, you probably neither need nor want that.


    Leave a comment:


  • slick07
    replied
    #1 Understood. This is how you want to keep it by design. But what can I do if I want to display the columns with certain given widths? And the same question for the grid header height...

    #2 The problem happens all the time and it seems that it doesn't come from the size of the icon. By inspecting the code for the component and the HTML that you generate for printing for a cell within a treeGrid an extra 2px/2px top/bottom padding is the cause.
    Component:
    Code:
    <td height="21" align="left" style="WIDTH:200px;OVERFLOW:hidden;padding-top: 0px;padding-bottom: 0px;white-space:nowrap;" class="treeCell">...</td>
    Print:
    Code:
    <td align="left" style="OVERFLOW:hidden;HEIGHT:17px;" class="treeTallCell">...</td>
    Hence if you also add the "padding-top: 0px;padding-bottom: 0px;" to the printing code the problem gets solved.

    Leave a comment:


  • Isomorphic
    replied
    Rearrange the screen meaning place the chart vertically under the TreeGrid. This particular strategy won't work for your use case, but in general, you can do this sort of thing: change settings, move components around, or even generate an entirely different screen for printing. Read the Printing overview: Print Preview is just a trivial Window created around the result of getPrintHTML(), you can replicate that with a few lines of code.

    #1 again, we keep saying this: we're not going to clip the printed output so column widths cannot be maintained.

    #2 so the browser is sizing the row based on the largest cell, and in your chosen skin and density, a cell with an icon is taller. if this only happens when the title column is hidden, just show it before printing.

    Leave a comment:


  • slick07
    replied
    I do not understand what you mean by rearrange the screen. Also how do I know when the printing is over or the user closed the print preview window?

    #1 By keeping the settings I mean keeping the column widths and the table header height. For example you are keeping the "text-align" attribute for column headers so why not other attributes... I can not adjust the printed HTML in this case as suggested to mathias because there are no identifiers to search for them and replace them.

    #2 Exactly. They are synchronised. For each row we are drawing an extension of it and some more graphical details. Because the height is not constant anymore the grid and the chart do not match anymore. See attached image to better understand.
    Attached Files

    Leave a comment:


  • Isomorphic
    replied
    You can rearrange your screen immediately before printing, and that's likely what you want to do here. You can just move it back to side by side after printing.

    #1 we don't understand what "keep the settings" means here

    #2 we don't follow - are you saying your chart is actually pointing to TreeGrid rows or something similar?

    Leave a comment:


  • slick07
    replied
    We have a custom component with a treeGrid on the left and a chart on the right separated by a split. Currently there is no possibility for browsers or third party components to split large horizontal html content on multiple pages. Or at least I could not find one... They are able to split content only vertically. Horizontally the content gets clipped. Hence trying to squeeze the content horizontally does not help at all since the table might have so many columns that it still does not fit on an e.g. A4 page and it will get clipped anyway. Plus we also have the chart hence the only possibility is for the user to print on higher page formats (A3... A1) in .pdf and then split the .pdf in A4 format.

    Now back to smartGWT...
    #1 Since packing the columns does not help us at all then why not letting the user to keep the settings... How can we do that?
    #2 The chart and the treeGrid are synchronised. If the rows height is not consistent then we can not make any computation anymore... In print preview it seems the height consistency gets broken. What can we do to fix it?

    Leave a comment:

Working...
X