jQuery UI Widgets Forums Grid Margin/padding when values is large

This topic contains 6 replies, has 2 voices, and was last updated by  nico86 10 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Margin/padding when values is large #68487

    nico86
    Participant

    Hi !
    hebergement images

    I have modified the rowheight in the definition of the grid like that

    $("#jqxgrid_1").jqxGrid(
    {
    width: "99%",
    height:"96.3%",
    rowsheight : 14,
    pageable: true,
    pagesizeoptions: ['5', '10', '20', '30'],
    pagesize: 10,
    source: dataAdapter,columnsresize: true,enabletooltips:true,sortable: true,altrows: true,
    theme: 'metro',

    and also the css :
    .jqx-grid-cell {
    font-size:10px!important;
    }

    I have created a cellsrenderer variable because vertical-align was wrong and add margin… But it seems something strange in line 3 with the margin…
    (i have tried padding but it is similar)

    var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
    return '<span style="vertical-align:middle;margin:3px">' + value + '</span>';}

    As you can see on the screen this below, everything is OK (the margin of 3px is taken into account) if the text is smaller than the width of the column but if the width of the text is upper that the width of the column (line 3) then there is no sufisante margin and the text is stuck at the edge of the cell

    How may I make ?

    Thanks
    Nicolas.

    Margin/padding when values is large #68495

    Nadezhda
    Participant

    Hello Nicolas,

    If you want to show the large text in cell you can set ‘autorowheight’ property to true. When it is set to true, the height of the Grid rows is dynamically changed depending on the cell values.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    Margin/padding when values is large #68496

    nico86
    Participant

    Thanks for your responses but No I do not want to increase the height of my cells because I can have a great deal of text in a cell, I want just to be able to solve the problem of margin when the size of my text is bigger than the width of the column

    Margin/padding when values is large #68584

    Nadezhda
    Participant

    Hi Nicolas,

    You can set ‘width’ property to each grid column with value which you needed to show the entire text. If this suggestion does not help you, please, provide jsfiddle.net sample in order to see what’s going wrong with your code.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    Margin/padding when values is large #68605

    nico86
    Participant

    HI,
    Because i have a very important number of colum i can’t set the width with a large number.
    But I have made a little example, and surpise all is ok : http://jsfiddle.net/ayTST/123/
    the margin that i have put in the cellrender is take into account even if the column is more important that the width.

    But i don’t now in my application it doesn’t work…..may be a css conflict…. 🙁

    Nicolas

    Margin/padding when values is large #68666

    Nadezhda
    Participant

    Hi Nicolas,

    Could you, please, check if there are duplicated css selector(classes and ids) names in your application ?

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    Margin/padding when values is large #68695

    nico86
    Participant

    i have changed many things and i don’t why but it work fine now….thanks

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.