Announcement

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

    Column ID for ListGrid

    Hello,

    Is it possible to set an ID for a column in a ListGrid? This ID can be used to identify a particular column and adjust the output of the getPrintHTML(). Right now this is how the header of a column appears:
    Code:
    <TD CLASS=printHeader ALIGN=left><div style='display:inline-block;max-width:100%;text-align:left;vertical-align:middle'><div id='isc_C8' style='overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>Column X</div></div></TD>
    Hence "Column X" has id='isc_C8' which is dynamically generated by the smartgwt framework. Is it possible to set a certain ID so I can use it later for further processing?

    Thank you

    #2
    This is not currently settable, in fact, that element might be removed.

    Because this is print HTML, it doesn't make much sense to have stable IDs in it (it's not meant to be interactive). So, you could post-process it to transform it if you are using it for something other than printing.

    Just be aware, the details of this HTML aren't a supported part of the API - it could change at any time, and has changed in the past as we've needed to work around new browser bugs.

    Comment


      #3
      I use the output for printing just that I would like to be able to post process it eg. set certain styles for certain columns. But for this I would need an identifier for each column to do a search and replace operation.

      I know that the resulted HTML may change at any time but I still use it because otherwise I would have to write all the code that you have already written to do exactly what you are already generating plus some minor quirks that for now I can do them through search and replace post-processing. Well... except this issue with identifying columns...

      Comment

      Working...
      X