jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • mmelnick
    Participant

    Hi Dimitar,

    I figured out what was causing the filter not to work in my implementation. As mentioned in the comments in the sample code up top, the File IDs had the format of 00038010. It appears that javascript engine was interpreting that as a number when I added a stringfilter to it, it would de whacky things. In my code sample up top, I changed the data fields to this:

    datafields: [            { name: 'UWI' },            { name: 'SOURCE' },            { name: 'FILE_ID', type: 'string' },            { name: 'CURVE_ID' },            { name: 'REPORTED_MNEMONIC' },            { name: 'REPORTED_DESC' },            { name: 'PRIMARY_INDEX_TYPE' },            { name: 'MAX_VALUE', type: 'number' },            { name: 'MIN_VALUE', type: 'number' }            ],

    The change was to add type: ‘string’ to the FILE_ID field and bam, it filters! 🙂

    Also, I tried out the demo above with jqxgrid v2.8 and that behaviour of losing the programmatically applied filter when a manual filter is added doesn’t show up.

    Thanks again for your help!!


    mmelnick
    Participant

    Hi Dimitar,

    Thanks for the speedy reply. It seems I must have something wrong with my implementation then. I’ll have to go through it more carefully to see if I can find my mistake. I was hoping I was just using the wrong type.

    I did notice an issue with the demo (when running against v2.7, so this might be fixed in v2.8) that will have an impact on the work flow once I get the pre-filtering working. And that is, a pre-filtered column doesn’t stick when the user manually applies a second filter. In your example, try these steps and you’ll see what I mean

    1. Click on “Filter Product column” – the two pre-decided products are all that shows and the column is shaded to indicate it’s filtered
    2. Enter the name Martin in the name filter – the product column ceases to be shaded and the product filtering is removed. The Name column is shaded and only Martins show in that column.

    Now try it manually.

    1. Remove Filter – all columns return to white
    2. In the “Product Name” checked list filter, manually untick “All” and then tick two products from the checked list – column is greyed and filtered correctly
    3. Now enter Martin in the name filter – both name and product remain greyed and filtered correctly. This is what I would assume the behaviour would be in the first workflow, so it seems that something isn’t quite the same when pre-filtering

    I’ll try updating jqxgrid to 2.8 and trying the demo again.

    Thanks again for your help!

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