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

Unbound mode not working properly

3 Answers 106 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Saravana Kumar
Top achievements
Rank 1
Saravana Kumar asked on 03 Oct 2010, 08:49 AM

Hi,
I'm having some trouble using the data filter in unbound mode. I got a standard scenario.

PropertyInfo namePF= typeof(Schema).GetProperty("name");
PropertyInfo rootNamePF = typeof(Schema).GetProperty("rootName");
PropertyInfo targetNamespacePF = typeof(Schema).GetProperty("targetNamespace");
  
List<ItemPropertyInfo> infos = new List<ItemPropertyInfo>();
infos.Add(new ItemPropertyInfo("Name", typeof(string), namePF));
infos.Add(new ItemPropertyInfo("Root Name", typeof(string), rootNamePF));
infos.Add(new ItemPropertyInfo("Target Namespace", typeof(string), targetNamespacePF));
  
this.dfSchemas.ItemProperties = infos;
this.dfSchemas.FilterDescriptors.CollectionChanged += this.FilterDescriptors_CollectionChanged;
this.radGridViewSchemas.ItemsSource = viewModel.Schemas;

 

<telerik:RadDataFilter Name="dfSchemas" Margin="5"/>
<telerikGridView:RadGridView
Name="radGridViewSchemas"  
ItemsSource="{Binding FilteredSource, ElementName=dfSchemas}" 


In the above code snippet case, "Name" property is working fine, but the other 2 properties "rootName" and "targetNamespace" doesn't work. They are all of same basic type string. 

Regards,
Saravana

 

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 04 Oct 2010, 08:39 AM
Hello Saravana Kumar,

I property cannot have a space in its name. It can have an attribute for its human-readable display name. However, adding this attribute programmatically and working with ItemPropertyInfo's turned out to be very cumbersome.

That is why we will obsolete the usage of ItemPropertyInfo's with the Q3 release, just for that reason  -- they are hard to create and even harder to modify.

We will replace them with our own ItemPropertyDefinition class, which will have the following properties:

- PropertyName: the name of the prop, can be complex nested prop, i.e. with dots.
- PropertyType: well, the type
- DisplayName: what the UI will show -- I think this will be perfect for localization.

In this way you will be able to easily define any kind of properties along with their DisplayName's.

Here is an example of how you will be able to specify properties:

<telerik:RadDataFilterName="radDataFilter"
                       Grid.Row="0"
                       Source="{Binding Items, ElementName=clubsGrid}"
                       AutoGenerateItemPropertyDefinitions="True"
                       Margin="1">
    <telerik:RadDataFilter.ItemPropertyDefinitions>
        <!--This will also be displayed along with the auto-generated properties.-->
        <datafilter:ItemPropertyDefinitionPropertyName="Players.Count"
                                           PropertyType="{x:Type system:Int32}"
                                           DisplayName="Squad Size">
        </datafilter:ItemPropertyDefinition>
    </telerik:RadDataFilter.ItemPropertyDefinitions>
</telerik:RadDataFilter>

Let me know if you want me to prepare a custom build for you. It will not be official, but you will be able to play around with the new functionality before the official Q3 Release comes out in November.

Greetings,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Saravana Kumar
Top achievements
Rank 1
answered on 04 Oct 2010, 10:34 AM
Thanks for your reply Ross. We can wait till Q3 release the project we are on is not going live until end of this year.

I also noticed a performance issue with the data filter, when the collection got around 100 items. Selecting the property combo box, condition combo box or displaying the result all takes much longer time. Its not smooth.
0
Rossen Hristov
Telerik team
answered on 04 Oct 2010, 11:28 AM
Hello Saravana Kumar,

If you can open a separate support ticket and send a sample project that demonstrates the performance issue, we will instrument it and see why is it being slow.

Thanks in advance.

Kind regards,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DataFilter
Asked by
Saravana Kumar
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Saravana Kumar
Top achievements
Rank 1
Share this question
or