Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
520
Filtering on date column fails when data in a grid is changed
posted

I am populating an IgGrid with a simple array of Id and Date. Filtering on a date column works perfectly. I then change the dataSource to another array (same as the first, just jumbled the order and changed Ids). Filtering on the data column now fails with an exception of "Unable to get property 'day' of undefined or null reference".

I've attached a modified sample to replicate this.

igGrid - bug.zip
  • 1235
    Verified Answer
    posted

    Hello Alan,

    There is a workaround that works just fine. If the datasource is changed via the igGrid's dataSource option setter (you can find more information about it here) there are no problems. For example:


    $('#grid1').igGrid("option", "dataSource", [
        {"Id":"4", "Date":"\/Date(1235088000000)\/"},
        {"Id":"5", "Date":"\/Date(1250809200000)\/"},
        {"Id":"6", "Date":"\/Date(1335394800000)\/"}
    ]);

    Changing the datasource like it is done in the sample was logged as a bug and is going to be fixed soon.

    Please feel free to contact me if you have further questions.

    Regards,
    Ivaylo Hubenov
    Entry-level developer