This is a migrated thread and some comments may be shown as answers.

[Solved] Filtering problem with relation data

3 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 2
Paweł asked on 02 Oct 2009, 02:06 PM
Hello,

I'm using EntityDataSource with table User. I have also included table Transport related to User.
I have a column in my grid
<telerik:GridBoundColumn DataField="Transport.City" DataType="System.String" HeaderText="Transport" UniqueName="Transport" /> 

Filtering "IsEmpty" and "IsNull" and "NotIsNull" always return empty grig, while "NotIsEmpty" works perfect.
I guess it's because User can have Transport = null, and I'm binding column to Transport.City.

Please help, I realy need "IsEmpty" filter to work.

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 07 Oct 2009, 09:31 AM
Hi Paweł,

You are correct that in the case when Transport is null, the grid should return no data and this expected since the filter expressions you are setting tells the grid that City is empty, no that Transport  is null. Therefore, you need to intercept the ItemCommand event and in the cases in question modify your filter expression accordingly. I have demonstrated this in a small sample attached to this post.

Hope this information helps.

All the best,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Paweł
Top achievements
Rank 2
answered on 08 Oct 2009, 01:46 PM
And how to get this attachment?
0
Tsvetoslav
Telerik team
answered on 09 Oct 2009, 10:58 AM
Hello Paweł,

Sorry for having left the attachment behind. I am attaching the files to this post.

All the best,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Paweł
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
Paweł
Top achievements
Rank 2
Share this question
or