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

SQL Datasource : Integer to checkbox column

2 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
perico
Top achievements
Rank 1
perico asked on 10 May 2017, 01:48 PM

Hi,

I fill my grid with one SQL table which contains an int col "SENT".

Its values are -1 for "OK" and 0 for "Not OK".

 

By default, the radgridview bind checked = 1 and unchecked = 0.

Is it possible to bind the checkbox column of the radgridview with -1=checked and 0=unchecked ?

 

Thank you.

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 May 2017, 01:57 PM
Hello Perico, 

Thank you for writing.  

The GridViewDataColumn provides a unified way of converting incompatible value types to a type supported by the column instance. Thus, you can control how the data coming from your database is interpreted by RadGridView. Please refer to the following help article which demonstrates a sample approach how you can handle your case: http://docs.telerik.com/devtools/winforms/gridview/columns/converting-data-types
 
I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
perico
Top achievements
Rank 1
answered on 10 May 2017, 02:27 PM
Thank you it works perfectly !
Tags
GridView
Asked by
perico
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
perico
Top achievements
Rank 1
Share this question
or