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

Filtering doesn't appear in RadGridView

4 Answers 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Aditya
Top achievements
Rank 1
Aditya asked on 10 Jun 2011, 05:08 PM
Hi Telerik Team,

I have created a RadGridView, in silverlight, with AutoGenearteColumns=False.
The data, XElement (XML format). will be fetched from a stored procedure in Sql Server 2008, using WCF service.
then i created column headers dynamicaaly, then i gave the Itemsource, which is a list(list<Dictionary<string,string>>).

The RadGridView is displaying the columns as required, except the filtering.

Version of RadGridView control is:2011.1.419.1040

Any help will be appreciated.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Jun 2011, 07:22 AM
Hi,

 You may need to specify DataType for these columns to enable filtering. 

Regards,
Vlad
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
Aditya
Top achievements
Rank 1
answered on 13 Jun 2011, 07:24 AM
Hi,

Thanks for your reply.

I will try and let you know, if i face any difficulty.
0
Aditya
Top achievements
Rank 1
answered on 13 Jun 2011, 10:53 AM
Hi Vlad,

Still i'm failing to get the filtering of columns.

i'm creating the Column headers dynamically, by looping, based on my XML format.

when i run the application, it is showing the data correctly, and the filter icon on the headers are showing, but when i click on it, it is throwing an unhandled exception. 

Error images are in attachment, please have a look on them.

Please have a look on my code.

{
                       indexingConverter convert = new indexingConverter();

                        System.Windows.Data.Binding bind = new System.Windows.Data.Binding { Converter = convert, ConverterParameter =                         "HeaderName" };

GridViewDataColumn telerikColumn = new GridViewDataColumn();
                        telerikColumn.UniqueName"HeaderName";
                        telerikColumn.IsReadOnly = true;
                        telerikColumn.Header = "HeaderName";
                        telerikColumn.DataMemberBinding = bind;
           telerikColumn.DataType = typeof(string);
                        radGV.Columns.Add(telerikColumn);
}

                        radGV.ItemsSource = listofValues;


 class indexingConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Dictionary<string, string> columnData = (Dictionary<string, string>)value;
            return columnData[parameter.ToString()];
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }


please help me in solving this.
        
0
Aditya
Top achievements
Rank 1
answered on 13 Jun 2011, 01:17 PM
Hi Vlad,

I got the stuff i want, thanks for your co-operation.

I got this by creating a DataTable.

Tags
GridView
Asked by
Aditya
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Aditya
Top achievements
Rank 1
Share this question
or