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

[Solved] GridCheckBoxColumn Filter - No AutoPostBack

1 Answer 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 30 Sep 2009, 09:32 PM
Hi,
I've got a problem using the GridCheckBoxColumn. I'm using v.2009.2.826.35 with RadGrid and a LinqDataSource control. It picks up the boolean fields and chooses to use a GridCheckBoxColumn which is fine. The problem is that I can't get the checkbox filter to autoPostBack even though AutoPostBackOnFilter is set. I basically want to eliminate the need for the filter icon since the checkbox should be enough (then I just to set the CurrentFilterFunction to "EqualTo"), since it's a boolean field and there's already constraints on the DB to not allow nulls. There's no need for the filter menu icon.

AutoPostBack on all the other filters work fine. From the resulting HTML, it seems that no "onclick" event is being rendered as is done when you use a regular ASP:CheckBox and set AutoPostBack=true. All the the other filters with AutoPostBackOnFilter set (for other GridBoundColumns resulting in different input types such as textbox types) are rendered with an "onchange" client side event.

Anyway, here's the code for 2 such columns:
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" CurrentFilterFunction="EqualTo" DataType="System.Boolean" 
                    DataField="Error" HeaderText="Error?" SortExpression="Error" UniqueName="Error" 
                    CurrentFilterValue="True" ReadOnly="True" ShowFilterIcon="false"
</telerik:GridCheckBoxColumn> 
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" DataField="Truncated" DataType="System.Boolean" 
                    HeaderText="Trunc?" SortExpression="Truncated" UniqueName="Truncated" ReadOnly="True"
 </telerik:GridCheckBoxColumn> 

I've tried this many different ways with the properties set numerous ways and can never get the filter column for the check box to post back on check change. the user still haa to go to the filter icon and select "EqualTo" from the filter menu or get it to postback some other way (e.g. by using another filter with AutoPostBackOnFilter set).

Is this a bug or am I just missing something simple?
Is the only alternative to use FilterTemplate and/or GridTemplateColumn for every column I want to do this?

Thanks,
Brad

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Oct 2009, 07:11 AM
Hi Brad,

Try downloading the latest internal build - the problem should be fixed in the latest dlls.

Best wishes,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Brad
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or