EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  Wrap text on RUI DataGrid Header columns

    Posted Fri January 22, 2016 06:22 AM

    Hi guys, i'm working whit RUI DataGrid in my handler.

    This is the code:

    grid DataGrid {
            marginLeft=20,
            behaviors = [
            ],
            headerBehaviors = [
                    intesta
            ],
            columns = [
                new DataGridColumn { name = "Col1",    displayName = "aaaaaaaaaaaaaaaa<br/>aaaaaaaaaaaaaaaa",        width = 80,    headerAlignment = DataGridLib.ALIGN_CENTER,     alignment = DataGridLib.ALIGN_CENTER}
            selectionMode = DataGridLib.DISABLE_SELECTION, enableSorting = no,
            pageSize = 15,
            showScrollbar = yes,
            showButtonBar = no,
            style = "overflow-x: scroll; overflow-y: scroll;",
            data = (consumi as any[])
        };

     

    function intesta(grid DataGrid in, cell Widget in, row any in, rowNumber int in, column DataGridColumn in)
            cell.height = "50px";
              headText TextField{
                  children = [
                      new HTML{text = "aaaaaaaaaaaaaaaa<br/>aaaaaaaaaaaaaaaa"}
                  ],
                  class = "wrap"
              };
            column.displayName = headText.innerHTML;
        end   

     

    CSS style

    .wrap{
        white-space: -o-pre-wrap;
        word-wrap: break-word;
        white-space: pre-wrap;
        white-space: -moz-pre-wrap;
        white-space: -pre-wrap;
    }

    How do I get have the wrap text and does not increase the width of the column?

    Thanks

     

    Matteo@MR


  • 2.  Re: Wrap text on RUI DataGrid Header columns

    Posted Fri January 22, 2016 04:57 PM

    Matteo,

     

    Put in your CSS file:

    .EglRuiDataGridHeaderCell span{    height: auto;}

    Ortwin

    Ortwin


  • 3.  Re: Wrap text on RUI DataGrid Header columns

    Posted Sat January 23, 2016 07:04 AM

    Thanks Ortwin , but I have to replace my class value = "wrap " into function intesta with this  one?

    Matteo@MR


  • 4.  Re: Wrap text on RUI DataGrid Header columns

    Posted Mon January 25, 2016 11:00 AM

    Hi Ortwin, I've tried tried but not working .

    Matteo@MR


  • 5.  Re: Wrap text on RUI DataGrid Header columns



  • 6.  Re: Wrap text on RUI DataGrid Header columns

    Posted Wed February 03, 2016 03:08 AM

    Perfect @Marcel-D 185ef4e2-58bb-459d-b414-d02f00ff390d​.

    Thank you so much!!!!

    Matteo@MR