I have an issue with RadControls for WinForms Q3 2012 where calling Rows.Add with an instance of a type inheriting from GridViewRowInfo causes the value in a GridViewCheckBoxColumn to display True/False instead of a check box. The following illustrates the issue:
What am I doing wrong?
Thanks.
using
Telerik.WinControls.UI;
namespace
TestApp {
partial
class
MainForm : RadForm {
public
MainForm() {
InitializeComponent();
ItemGrid.Rows.Add(
new
CustomRowInfo(ItemGrid,
"Item #1"
,
true
));
ItemGrid.Rows.Add(
new
CustomRowInfo(ItemGrid,
"Item #2"
,
false
));
}
private
class
CustomRowInfo : GridViewRowInfo {
public
CustomRowInfo(RadGridView owner,
string
text,
bool
enabled)
:
base
(owner.MasterView) {
Cells[0].Value = text;
Cells[1].Value = enabled;
}
public
string
Text {
get
{
return
Cells[0].Value.ToString(); }
set
{ Cells[0].Value = value; }
}
public
bool
Enabled {
get
{
return
(
bool
) Cells[1].Value; }
set
{ Cells[1].Value = value; }
}
}
}
}
What am I doing wrong?
Thanks.