Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interval grouping by Nullable<DateTime> doesn't work properly #85

Closed
GoshaFighten opened this issue Dec 5, 2016 · 12 comments
Closed

Interval grouping by Nullable<DateTime> doesn't work properly #85

GoshaFighten opened this issue Dec 5, 2016 · 12 comments
Assignees
Labels

Comments

@GoshaFighten
Copy link

See the Filter row does not filter properly for nullable date field ticket for details.
T458279.zip

@AlekseyMartynov AlekseyMartynov changed the title Data is grouped incorrectly against the nullable DateTime property Interval grouping by Nullable<DateTime> doesn't work properly Dec 12, 2016
@AlekseyMartynov
Copy link
Contributor

Test case (in the context of GroupHelperTests):

var data = new[] {
    new { d = new DateTime?(new DateTime(1996, 7, 4)) },
    new { d = new DateTime?() }
};

var groups = CreateHelper(data).Group(data, new[] {
    new GroupingInfo { Selector = "d", GroupInterval = "year", IsExpanded = false },
    new GroupingInfo { Selector = "d", GroupInterval = "month", IsExpanded = false },
    new GroupingInfo { Selector = "d", GroupInterval = "day", IsExpanded = false }
});

@vconst @Alyar666
What behavior we expect?
Should null values be ignored during the calculation of date group intervals?

@vconst
Copy link
Contributor

vconst commented Dec 13, 2016

The null values should not be ignored. The groups array should contains item with key value null. The grid ignores the items property in header filter when key is null.

@AlekseyMartynov
Copy link
Contributor

Do I understand correctly: there must be 3 group levels with null keys?

@vconst
Copy link
Contributor

vconst commented Dec 14, 2016

Yes

@AlekseyMartynov
Copy link
Contributor

Fix will be included in release 1.2.1

@GiviKDev
Copy link

GiviKDev commented Feb 2, 2017

Hello,

Header Filter not working with Nullable<DateTime> when RemoteOperations is set to true.

public static object Load<T>(IQueryable<T> source, DataSourceLoadOptionsBase options);
method throws an exception:

Value cannot be null.
Parameter name: constructor

Version 1.2.3

@AlekseyMartynov
Copy link
Contributor

@roman-simionov PTAL

@roman-simionov
Copy link
Contributor

Hello @GiviKDev,

My attempts to reproduce the issue with the sample project were unsuccessful. The header filter works correctly with Nullable<DateTime> and the enabled RemoteOperations options. Would you please update my sample to illustrate the issue.

@GiviKDev
Copy link

GiviKDev commented Feb 3, 2017

Hello @roman-simionov ,
I updated your sample project, where you can reproduce current bug.

T458279.zip

@roman-simionov
Copy link
Contributor

@GikiDev, thank you for your reply. Now I see the issue appears when EF is used. We will fix it in the context of this issue

@AlekseyMartynov
Copy link
Contributor

Hi @GiviKDev

Would you please check the fixed NuGet from https://ci.appveyor.com/project/dxrobot/devextreme-aspnet-data/build/244/artifacts ?

You will need the following binding redirect in web.config:

<dependentAssembly>
 <assemblyIdentity name="DevExtreme.AspNet.Data" publicKeyToken="982f5dab1439d0f7"/>
 <bindingRedirect oldVersion="0.0.0.0-99.0.0.0" newVersion="99.0.0.0"/>
</dependentAssembly>

P.S. How to install a Nuget Package .nupkg file locally

@GiviKDev
Copy link

Hello,

Thanks, it's working like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants