# Binding C1CheckBox to an Integer Field

Learn how to bind C1Checkbox to an IntegerField in Input controls.

## Content



To programmatically bind **C1CheckBox** to an Integer field, use the following code:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
c1CheckBox1.DataSource = dt
c1CheckBox1.DataField = "ColumnInt"
c1CheckBox1.DataType = GetType(Integer)
‘Use TranslateValues property to translate string values to/from the check box states. 
c1CheckBox1.TranslateValues.Checked = 1
c1CheckBox1.TranslateValues.Unchecked = 0
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
c1CheckBox1.DataSource = dt;
c1CheckBox1.DataField = "ColumnInt";
c1CheckBox1.DataType = typeof(int);
// Use TranslateValues property to translate string values to/from the check box states. 
c1CheckBox1.TranslateValues.Checked = 1;
c1CheckBox1.TranslateValues.Unchecked = 0;
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Setting the Calendar Drop-down](/componentone/docs/win/online-input/inputforwinformstask/settingthecalendardr)