Hi, I am new to telerik.
I am trying to implement basic filtering on a RadGrid control. the control has a LinqDataSource, as you will see from the snippet below. I can filter data with the "Donated" column which is of type Boolean and it works and the grid gets properly refreshed. however whenever i filter with any other column, be it Date or String it doesn't. I am following the example http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx and the only difference i can see is the DataSource type, the example uses SQL while i am using Linq.
can anyone point me in the right direction please.
thank you
I am trying to implement basic filtering on a RadGrid control. the control has a LinqDataSource, as you will see from the snippet below. I can filter data with the "Donated" column which is of type Boolean and it works and the grid gets properly refreshed. however whenever i filter with any other column, be it Date or String it doesn't. I am following the example http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx and the only difference i can see is the DataSource type, the example uses SQL while i am using Linq.
can anyone point me in the right direction please.
thank you
<
telerik:RadGrid
ID
=
"PublicationsGrid"
runat
=
"server"
GridLines
=
"None"
DataSourceID
=
"PublicationsSource"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
PageSize
=
"12"
ShowFooter
=
"True"
AllowPaging
=
"False"
AutoGenerateColumns
=
"False"
ShowStatusBar
=
"true" EnableLinqExpressions="true"
>
<
ClientSettings
EnableRowHoverStyle
=
"True"
>
<
Selecting
AllowRowSelect
=
"True"
EnableDragToSelectRows
=
"False"
/>
</
ClientSettings
>
<
MasterTableView
DataSourceID
=
"PublicationsSource"
AllowFilteringByColumn
=
"true"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Isbn"
FilterControlAltText
=
"Filter Isbn column"
HeaderText
=
"Isbn"
SortExpression
=
"Isbn"
UniqueName
=
"Isbn"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Title"
FilterControlAltText
=
"Filter Title column"
HeaderText
=
"Title"
DataType
=
"System.String"
SortExpression
=
"Title"
UniqueName
=
"Title"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PublicationDate"
DataFormatString
=
"{0:dd/MM/yyyy}"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter PublicationDate column"
HeaderText
=
"Date of publication"
SortExpression
=
"PublicationDate"
UniqueName
=
"PublicationDate"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Pages"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Pages column"
HeaderText
=
"Pages"
SortExpression
=
"Pages"
UniqueName
=
"Pages"
AllowFiltering
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Donated"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter Donated column"
HeaderText
=
"Donated"
SortExpression
=
"Donated"
UniqueName
=
"Donated"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Cost"
DataType
=
"System.Double"
FilterControlAltText
=
"Filter Cost column"
HeaderText
=
"Cost"
SortExpression
=
"Cost"
UniqueName
=
"Cost"
AllowFiltering
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FullPrice"
DataType
=
"System.Double"
FilterControlAltText
=
"Filter FullPrice column"
HeaderText
=
"Full Price"
SortExpression
=
"FullPrice"
UniqueName
=
"FullPrice"
AllowFiltering
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"DiscountPrice"
DataType
=
"System.Double"
FilterControlAltText
=
"Filter DiscountPrice column"
HeaderText
=
"Discount Price"
SortExpression
=
"DiscountPrice"
UniqueName
=
"DiscountPrice"
AllowFiltering
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CurrentStockLevel"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter CurrentStockLevel column"
HeaderText
=
"Current Stock Level"
SortExpression
=
"CurrentStockLevel"
UniqueName
=
"CurrentStockLevel"
AllowFiltering
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Language"
FilterControlAltText
=
"Filter Language column"
HeaderText
=
"Language"
SortExpression
=
"Language"
UniqueName
=
"Language"
AutoPostBackOnFilter
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"True"
>
</
FilterMenu
>
</
telerik:RadGrid
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"PublicationsGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"PublicationsGrid"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
<
asp:LinqDataSource
ID
=
"PublicationsSource"
runat
=
"server"
ContextTypeName
=
"App.Business.StockPubContainer"
EntityTypeName
=
"App.Business.Publication"
TableName
=
"Publication"
>
</
asp:LinqDataSource
>