Hi,
I m new to using Telerik controls and working on using a radgridview in my project. I have to bind a string DB column(Y/N) to a check box column in the grid and when user changes the check boxes, appropriate check box state has to be converted as Y/N and save back to the business entity object which was bonded. I have used the type converters to convert the TRUE/FALSE values to Y/N, but for some reason, they are again becoming as TRUE/FALSE before committing the dataset. Can anyone throw some light on whats happening here?
Also not sure about which event to handle when user changes the check boxes and appropriately change corresponding Be updated. Thanks much in advance.
Grid column binding with DB column with type converter:
GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn();
checkBoxColumn.DataType = typeof(string);
checkBoxColumn.Name = LocationDo.GenerateSheetsColumn;
checkBoxColumn.FieldName = LocationDo.GenerateSheetsColumn;
checkBoxColumn.HeaderText = "Generate Tests?";
checkBoxColumn.DataTypeConverter = new ToggleStateConverter();
dgvLocations.MasterTemplate.Columns.Add(checkBoxColumn);
dgvLocations.Columns[LocationDo.GenerateSheetsColumn].Width = 55;
Property definition:
[TypeConverter(typeof(ToggleStateConverter))]
public string GenerateSheets
{
get { return _GenerateSheets; }
set { _GenerateSheets = value; }
}
Thanks,
-Chandra