Column widths on filtered columns

(8 posts) (3 voices)
  1. situ, Member

    Hi

    I have a report spreadsheet with a select filter

    select 'dbr.column.filter','column1','select';

    The width of the column cannot be controeld with the statement

    SELECT 'dbr.colstyle','column1','[min-width: 200px; max-width:200px; word-wrap:break-word;]';

    When I remove the filter the width control works.

    Any suggestions on how to mange the width of a filtered column?

  2. myDBR Team, Key Master

    The column filter does not have the same column style definition and therefore forces the column width. You can apply the same width definition to column filter via CSS or using jQuery.

    --
    myDBR Team

  3. Deepak, Member

    Hi,

    I have tried changing the width in userstyle.css same as the width defined in dbr.colstyle for the columns. The column width still changes when filter is applied.

    Please suggest any alternative method.

  4. myDBR Team, Key Master

    Without seeing your code or what data is used it is bit difficult to help.

    Could you show the code and when the column filter is applied, does the column become too narrow or too wide?

    --
    myDBR Team

  5. Deepak, Member

    Hi,

    I am trying to apply the column width for 2 fields column1 and column2 in mydbr, both are free text fields in my application. The columns become narrow when the filter is applied.

    Below are the commands applied in my report,

    SELECT 'dbr.colstyle','column1','[min-width: 200px; max-width:300px; word-wrap:break-word;]';
    SELECT 'dbr.colstyle','column2','[min-width: 200px; max-width:300px; word-wrap:break-word;]';

    Userstyle.css changes made as below,

    select {
    border: 1px solid #767676;
    min-width: 200px;
    max-width: 300px;

    }

  6. myDBR Team, Key Master

    Hi,
    could you show what the column width was before the filter was applied and what it was after it was applied?

    Notice that you have not actually specified the column width, just min and max widths. Also be aware that some browsers (notably older IE's) may ignore the max-width unless you apply to it to a div inside the cell.

    Applying CSS definitions to basic HTML elements like 'select' may result to unexpected results elsewhere. You might want to consider limiting the scope with class definition used in your code. Also, IE will probably ignore the max-width applied to a select-element. You can try width instead.

    --
    myDBR Team

  7. Deepak, Member

    Hi,

    I am using Firefox v 23. I had tried applying width: 300px; both in usersyle.css and report code.
    When i check for the width in firebug i dont see anything, so i assume it is not picking up the assigned column width for a specific column.

  8. myDBR Team, Key Master

    How did you apply the width and to which element? What does firebug show you?

    --
    myDBR Team


Reply

You must log in to post.