jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 71 total)
  • Author
    Posts

  • stephan
    Participant

    Hi,

    Could you please consider adding this as a feature to jqxMenu ? If an application has a menu bar it is (at least in my experience) quite often necessary to enable or disable menu entries depending on certain application conditions, e.g. if something has been selected, or the user has enetered something into a specific control or enabled a certain switch, etc

    My requriement is that I want to display a menu that (amongst other things) offers actions for a grid: in the menu there are entries for “New”, “Delete”, “Edit”, etc. Specifically I want to disable “Delete” and “Edit” menu entries if the user has not selected a grid row, because these two actions shall operate on the current slected grid row.

    How about setting the “disabled” attribute on the HTML “li” element ? Would that work correvtly in combination with an already created jqxMenu ?

    Regards,
    Stephan


    stephan
    Participant

    Hi Peter,

    Thanks, yes, I made some similar experiments and found hat by increasing the wrapper margins the jqxTabs can be lured out from underneath the scrollbar. The downside of the extra margins is that without the scrollbar the jqxTabs now has extra free space to the sides.

    In other words: to compensate correctly for the oberved effect I would need a different margin depending on whether there is a vertical scrollbar showing in the surrounding jqxPanel, or not.

    I’d very much appreciate it if you could fix this problem on the jQWidgets side, so that compensation or over-compensation, or even a “resize” handler with complex logic does not become neccessary.

    Regards,
    stephan


    stephan
    Participant

    Hi Peter,

    And you do not consider it stranget that an 8 PIXEL padding&border results in 8 PERCENT getting added to the 100% width ? Mathematically speaking that … unusual.

    Buts thats now besides the point, as I have totally given up on “box-sizing: border-box”. The very idea of that concept is that width and height do NOT get modified, and jQWidgets behaves different (while pure HTML in all browsers handles it correctly). Thus I’m now back to default “box-sizing”, because the very reason why I introduced “box-sizing: border-box” in the first place does not work qith jQWidgets.

    Just as an explanation and sidenotes: what really troubles me is that jQWidgets does not honor the sizes that I specify. For the purpose of creating a good dialog layout this is extremely anoying and difficult to correct or work around. For SOME jQWidget controls when I specify 80 pixel width I get a control with 80 pixel width, whilefor some OTHER jQWidget controls when I specify 80 pixel width I get a control that has 82 pixel width. A difference that can actually be seen and also a difference that in the case of for instacne jqxPanel results in browser scrollbars where I absolutely do not want or need them.

    You might argue that this is very similar to how HTML gets rendered by browsers, but OTOH that why I (attempt) to use a library: so that the library can work around such shortcomings of browser or HTML or CSS rendering. From a GUI controls library I simply expect that when I specify a width and height I actually get a control with exactly the specified width and height, but not with an unknown amount of extra pixels added SOEMTIMES to SOME of the controls.

    The current behavior of jQWidgets makes it particularely difficult to use 100% for width and/or height, and jqxPanel is a good example for this difficulty. I wrap my GUI in a jqxPanel and set width and height to 100%, because I want it to fit neatly in the container provided by the application that uses the GUI. Yet what I get instead is a jqxPanel that is 100% PLUS 2 pixels in width and height. An annoying extra that I now must find a workaround fo:
    * There is no place in jQWidgets where I can query the amount of extra pixels, thus I must hardcode the ‘2’ as an empirically determined value into my application (if you ever change this to e.g. 4 my code shall break)
    * the only way (known to me) to correctly work around the problem of 2 extra pixels on a container with percentage width is to wrap the container in an additional div with absolute position and with a 1px distance to all 4 sides (I tried using “overflow:hidden” instead, but this will cut of half the border of the jqxPanel)

    The above workaround is required for all jqxPanel I use, and it looks like I’ll have to useit in some other places as well (jqxTabs appear to cause similar trouble). For all input controls I’ll have to SOMETIMES (!) hard code a “desiredWidth -2” depending on the type of the input control (eg. jqxInput requires it, but jqxButtons doesnt).

    Ok, final words: this is the last time that I’ll compain about the issue explained above, I promise 🙂 We’ve discussed it back and forth and I’m just trying to explain why the issue causes me so much trouble (and extra coding effort).

    Regards,
    Stephan

    in reply to: height:100% doesn't work :( height:100% doesn't work :( #25721

    stephan
    Participant

    Hi Peter,

    Has this feature been implemented of having percentage width/height suport in jqxDockPanel ?

    It would be an elegnat solution for a tricky problem I’m having with defining a sticky header that can grow downwards and a body that occupies the remaining space. The tricky part is that the enclosing div has dynamic size, and so I require a solution that can work with 100% for width and height.

    Regards,
    Stephan

    in reply to: Input too high by 2 pixel Input too high by 2 pixel #24930

    stephan
    Participant

    Hi again,

    There is one more thing, which is the reason why I included “box-sizing: border-box” in my example. You see I was actully hoping that all you do is apply the “width” to the “input” and let the browser render the rest. If this were true then setting “box-sizing: border-box” would actually give me exactly what I want: an input with the height exactly as specified. Sadly, as the sample fiddle shows, this is not the case. Even for “box-sizing: border-box” I get a size difference between input an button.

    I have extended my fiddle example to illustrate my point above:
    http://jsfiddle.net/_stephan_/FuH67/3/

    The pure HTML controls have identical height for “box-sizing: border-box” despite the border (and default padding). For the jQWidgets controls you can observe that the input has a height of 28px.

    I can only assume that somewhere within jQWidgets you do adjust the height given to an input (by adding 2px), instead of applying it directly to the control. Modifying the height is in fact what I originally asked for, just the other way round: remove 2 pixel for normal box sizing and do not modify height for “box-sizing: border-box” 🙂

    Regards,
    Stephan

    in reply to: Input too high by 2 pixel Input too high by 2 pixel #24927

    stephan
    Participant

    Hi Peter,

    Well my problem is not with the browser built-in “input” but with “jqxInput” where I explicitly specify the desired size in the control initializer call. It would be nice if a library that offers controls would (internally) ensure that a control generated through the library respects the sizes specified at library control creation time. Thats the reason why I am posting this request.

    I am well aware that when I deal with HTML markup and CSS directly I am at the mercy of the browser rendering. The very reason for using libraries like jQWidgets is the hope that they improve control handling and rendering.

    In other words (and back to the specific topic) if I create two jQWdiget controls giving them both the same size I would expect jQWidgets to (internally) create them in such a way that they show up with the same size.

    Regards,
    Stephan


    stephan
    Participant

    Hi,

    I have coded a solution for show/hide of columns, but not through the column menu. While adding a “hide” might conceivably be possible you will definitely not be able to use this for “show” because after “hide” the column is gone, including its header and header menu.

    This fiddle shows a simplyfied version of my solution, which adds a “Settings” button to the pager area of the table. Click on “Settings” to toggle column visibility.

    http://jsfiddle.net/_stephan_/Q92wz/2/

    (My full solution includes the fully operational search field and also extra buttons for “New” and “Delete” of grid columns)

    Regards,
    Stephan


    stephan
    Participant

    Hi mullai,

    >> the grid should group the filtered rows and highlight the corresponding rows
    >> and unmatched rows should be seen below the filtered rows

    Sorry, but that is something I do no know how to do. After all I am also just a user of jQWidgets 🙂 Maybe Peter can help you better.

    As a SIDENOTEand tip for you (this will not solve your highlighting problem though): I have seen in your code that you do not assign “datafield” names to your columns. Earlier on I had problems with sorting when using source type “array” and this was caused by not having defined “datafield” names. This might also have an effect on filtering.

    In this posting here you will find my question and also the solution:
    http://www.jqwidgets.com/community/topic/problems-with-data-source-type-array/

    In particular look for the last reply from Peter which gives a good code example. I ahve also created a working example that applies correctly the “datafields” property to the “source” object:
    http://jsfiddle.net/_stephan_/t7G9Z/1/

    Regards,
    Stephan

    in reply to: grid filtering bug ? grid filtering bug ? #24866

    stephan
    Participant

    Hi Pter,

    Yes, I know how to filter correctly. My own filtering code and logic now works just fine, whcih is also due to your help, no problem there.

    All I wanted to point out is that a filter that is created in source code and applied to the grid shows up incorrect within the popup menu that you can open interactively via column header. I suspect a bug in the logic that looks at the filters to determine what to show. My example constrcuts a filter with “OR” operator and yet the popmenu shows “AND”.

    Thats all, other then that I’m fine now.

    Regards,
    Stephan


    stephan
    Participant

    Hi Peter,

    Thanks for the hint, I found it.

    Regards,
    Stephan


    stephan
    Participant

    Hi,

    I faced a similar problem: I wanted to apply a global filtering condition to all columns of a grid. I have an input field where the user can input a substring and I want the table to show only those rows where anywhere on the row the substring occurs. In order to do this I have writte this function:

      function setGlobalFilter (filtervalue) {
    var columns = cgTableObject.jqxGrid('columns');
    var filtergroup, filter;
    // clear filters and exit if filter expression is empty
    cgTableObject.jqxGrid('clearfilters');
    if (filtervalue == null || filtervalue == '') {
    return;
    }
    // the filtervalue must be aplied to all columns individually,
    // the column filters are combined using "OR" operator
    for ( var i = 0; i < columns.records.length; i++) {
    if (!columns.records[i].hidden && columns.records[i].filterable) {
    filtergroup = new $.jqx.filter();
    filtergroup.operator = 'or';
    filter = filtergroup.createfilter('stringfilter', filtervalue, 'contains');
    filtergroup.addfilter(1, filter);
    cgTableObject.jqxGrid('addfilter', columns.records[i].datafield, filtergroup);
    }
    }
    cgTableObject.jqxGrid('applyfilters');
    }

    Maybe it helps you ?
    (“cgTableObject” is the jQuery object reference for my table object)

    Regards,
    Stephan

    in reply to: Filtering Questions Filtering Questions #24781

    stephan
    Participant

    Hi again,

    Ok, I made a few tests and they tell me: it is NOT possible to apply TWO filter grousps to ONE column. The second filter group for a column will replace the first.

    Since I now know I can not code a complex expression for a single column using filter groups I am now wondering how this can be achieved. Here is my problem:
    * lets assume I have 5 filters called A, B, C, X, Y
    * what I must achive is the following : (A or B or C) and (X or Y)

    How can that be achieved using the filtering logic of the grid ? According to boolean algebra the term can be converted into an expression without braces:
    “A and X or B and X or C and X or A and Y or B and Y or C and Y”

    Sadly even the converted expression relies on operator preceedance (ie. ‘and’ must be applied first) and therefore can not be applied to a grid column using your filtering logic … or at least thats how I understand it.

    Regards,
    Stephan

    in reply to: Filtering Questions Filtering Questions #24755

    stephan
    Participant

    Hi Peter,

    Thanks for your reply. In your reply you speak of using a group to apply multiple filters to a column. My question is: can I also add multiple filter groups to one column ?

    The advantage to me would be better organization of filters in my software for complex filtering conditions.

    Regards,
    Stephan


    stephan
    Participant

    Hi,

    Did you find the time to look into the issue I reported above ?

    What I tested just now is that it still exists within jQWidgets 2.9.2

    Thanks,
    Stephan


    stephan
    Participant

    Hi,

    As far as I can see this issue was fixed in jQWidgets 2.9.2, therefore the fiddle that is linked above no longer (re)produces the problem.

    Regards,
    Stephan

Viewing 15 posts - 31 through 45 (of 71 total)