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

RadGrid with OpenAccess - not filtering on checkbox (bit field)

1 Answer 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Calsh
Top achievements
Rank 1
Calsh asked on 31 Aug 2013, 09:55 AM
Using RadGrid with OpenAccess - get error message as below when try to filter on checkbox column i.e. tick filter checkbox and select EqualTo.
(Using SQL Server 2008 and SiteStatus is a bit field)

Error is:

System.NotSupportedException: Execution of 'System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]:.ctor(Boolean)' on the database server side currently not implemented.

Code is:
<telerik:GridCheckBoxColumn DataField="SiteStatus" DataType="System.Boolean" FilterControlAltText="Filter Site Status column"
    HeaderText="Site Status" SortExpression="SiteStatus" UniqueName="SiteStatus"  DefaultInsertValue=""
    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
 
    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
    <ItemStyle HorizontalAlign="Center"></ItemStyle>
</telerik:GridCheckBoxColumn>

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 04 Sep 2013, 06:47 AM
Hello Colman,

It seems that the field in your database is Nullable. The GridCheckBoxColumn places a CheckBox control on the page which does not have a nullable state which prevents from binding it with nullable boolean types. You could achieve your scenario by placing a GridTemplateColumn and manually set the CheckBox Checked state and decide if the null value will equal true or false.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Calsh
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or