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

Filtres de colonnes n'apparaissent plus

4 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Exo
Top achievements
Rank 1
Exo asked on 02 Feb 2011, 11:14 AM
Hello and thank you in advance for your reply.

The goal of our program is to display an array generated automatically.


For this, we define in the code behind the different columns, then we add them to RadGridView.

The problem is that we would keep the filter on headers for all columns.


We would like to know how to implement the header of the column dynamically to keep our text, but adding the filter area that you have already encoded.


Here is the automatic generation of columns.

//mt - Pour chaque colonne du tableau
foreach (T_CATEGORIES lLigne in ((CIndicateur)this.DataContext).ListeIndicateurs)
{
//mt - On crée une nouvelle instance de ligne
lCol = new GridViewDataColumn();
//mt - On lui affecte le nom de la colonne
lCol.Header = lLigne.CAT_NOM;
                 
//mt - On lui affecte le template de la cellule
lCol.CellTemplate = (DataTemplate)XamlReader.Load(Creation_CellTemplateIndicateur(lLigne));
//mt - On ajoute la ligne
pTableau.Columns.Add(lCol);
}

Regards

4 Answers, 1 is accepted

Sort by
0
Joachim
Top achievements
Rank 1
answered on 02 Feb 2011, 11:26 AM
Si tu veux que Telerik te réponde rapidement, je te conseille d'écrire plutôt en anglais :)

Sinon tu as essayé d'utiliser la propriété : IsFilterable = true de GridViewDataColumn ?
0
Exo
Top achievements
Rank 1
answered on 02 Feb 2011, 11:31 AM
Merci pour le conseil (je vais le traduire rapidement.).

Oui cela fait partie des premières choses que j'ai essayé mais sans succès.
0
Rossen Hristov
Telerik team
answered on 02 Feb 2011, 01:58 PM
Hello,

In order for the filtering funnel to appear, you will have to specify a DataMemberBinding and a DataType for each column. As for the Header -- the way you are doing it is correct.

Unfortunately, I could not understand the last two posts since I don't speak French. Telerik provides support in English only. Thank you for your understanding.

Greetings,
Ross
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Exo
Top achievements
Rank 1
answered on 02 Feb 2011, 02:23 PM
Both comments relate my commentary in French.
I'll write in English.

However the problem was solved by adding a datamembinding and a datatype.

It works!
Thank you for your help.

Regards.
Tags
GridView
Asked by
Exo
Top achievements
Rank 1
Answers by
Joachim
Top achievements
Rank 1
Exo
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or