Hi all,
I thought I'd post this here, in case it helps anyone else who gets as stuck as I did with this! I am using RadControls for ASP.NET AJAX Q3 2009.
I have a RadGrid using Filtering (AllowFilteringByColumn="True" EnableLinqExpressions="false") and declarative data binding with ObjectDataSource. I have several GridTemplateColumns, the final one is bound to a bool property on a business object. All looks fine until I try to filter any of the columns - when I do, no records are returned and the grid is empty.
I tracked this down to enabling filtering on the GridTemplateColumn bound to the boolean property. If I enable fitering on this particular column, no columns will filter and I get no records at all. If I disable filtering on this column (see code below), filtering on the other columns works fine!!!
Fixed GridTemplateColumn:
If anyone know of a fix, it would be great, if not, I hope this helps someone else out.
Anthony
I thought I'd post this here, in case it helps anyone else who gets as stuck as I did with this! I am using RadControls for ASP.NET AJAX Q3 2009.
I have a RadGrid using Filtering (AllowFilteringByColumn="True" EnableLinqExpressions="false") and declarative data binding with ObjectDataSource. I have several GridTemplateColumns, the final one is bound to a bool property on a business object. All looks fine until I try to filter any of the columns - when I do, no records are returned and the grid is empty.
I tracked this down to enabling filtering on the GridTemplateColumn bound to the boolean property. If I enable fitering on this particular column, no columns will filter and I get no records at all. If I disable filtering on this column (see code below), filtering on the other columns works fine!!!
Fixed GridTemplateColumn:
<telerik:GridTemplateColumn HeaderText="Enabled" DataField="Enabled" UniqueName="Enabled" SortExpression="Enabled" InitializeTemplatesFirst="false" ForceExtractValue="Always" AllowFiltering="false"> |
<ItemTemplate> |
<%# (Boolean.Parse(Eval("Enabled").ToString())) ? "Yes" : "No" %> |
</ItemTemplate> |
<EditItemTemplate> |
<asp:CheckBox ID="chkEnabled" runat="server" Text="Enabled" Checked='<%# Bind("Enabled")%>'></asp:CheckBox> |
</EditItemTemplate> |
</telerik:GridTemplateColumn> |
If anyone know of a fix, it would be great, if not, I hope this helps someone else out.
Anthony