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

Filters not showing with list of objects

0 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ravi Kishore
Top achievements
Rank 1
Ravi Kishore asked on 20 Aug 2012, 11:45 AM
Hi,
    We are binding a list of objects to gridview and enable filter on couple of columns. Data is collection of two different types of objects (Folder and File). Both Folder and File are having some common properties like Name, Description,... We are showing these common properties in the grid. When ever data having items of two type filter are not showing. If the data contain items of only one type (Either Folder or File) then filter are showing.
XAML:
<telerik:RadGridView x:Name="gridView" Visibility="Collapsed"  Margin="0" Grid.Row="2"  AutoGenerateColumns="False" AllowDrop="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed"
                                 CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="False" IsFilteringAllowed="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Name" Width="450" IsFilterable="True"/>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Description}" Header="Description" Width="*" IsFilterable="True"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
CS:
public class Folder
{
public string Name {get; set;};
public string Description {get;set;}
public string FolderType{get;set;}
}
 
public class File
{
public string Name {get; set;};
public string Description {get;set;}
public string Extension{get;set;}
public string MIMEType{get;set;}
}
 
List<object> items = GetFolders().toList<object>();
items.AddRange(GetFiles().toList<object>();
 
gridView.ItemsSource = items;

Please help me on this. I am stuck with this from 2 days. Thanks in advance.

Thanks,
Ravi Kishore. Ch
Tags
GridView
Asked by
Ravi Kishore
Top achievements
Rank 1
Share this question
or