hello
i am face one problem regarding gridview filter
in my gridview columns are dynamically added from code behind
Code Behind file
in code i am set a column's IsFilterable = true
but filter icon not shown in gridview
i am face one problem regarding gridview filter
in my gridview columns are dynamically added from code behind
<
grid:RadGridView
x:Name
=
"FormsGrid"
Margin
=
"5,0,10,0"
CanUserFreezeColumns
=
"False"
AutoGenerateColumns
=
"False"
ScrollMode
=
"RealTime"
MinHeight
=
"300"
BorderThickness
=
"1,6,1,1"
telerik:StyleManager.Theme
=
"Office_Blue"
ScrollViewer.HorizontalScrollBarVisibility
=
"Visible"
ItemsSource
=
"{Binding PagedSource, ElementName=radDataPager1}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
SelectionChanged
=
"FormsGrid_SelectionChanged"
DataLoaded
=
"FormsGrid_DataLoaded"
LayoutUpdated
=
"FormsGrid_LayoutUpdated"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
IsFilteringAllowed
=
"True"
>
</
grid:RadGridView
>
FormsGrid.Columns.Clear();
FormsGrid.AutoGenerateColumns =
false
;
for
(
int
i = 0; i < columnCount; i++)
{
XElement element = myDoc.Element(
"NewDataSet"
).Element(
"Table"
).Elements().ElementAt(i);
dgtc =
new
GridViewDataColumn();
dgtc.MinWidth = 100;
dgtc.IsReadOnly =
true
;
dgtc.Width = GridViewLength.SizeToHeader;
dgtc.Header = element.Name.ToString().Replace(
"_x0020_"
,
" "
).Replace(
"_x0028_"
,
" ("
).Replace(
"_x0029_"
,
") "
);
dgtc.DataMemberBinding =
new
Binding(element.Name.ToString().Replace(
"-"
,
" "
));
dgtc.DataMemberBinding.Source = element.Name;
indexingConverter convert =
new
indexingConverter();
Binding bind =
new
Binding { Converter = convert, ConverterParameter = element.Name };
dgtc.DataMemberBinding = bind;
dgtc.IsFilterable =
true
;
FormsGrid.Columns.Add(dgtc);
}
in code i am set a column's IsFilterable = true
but filter icon not shown in gridview