Hi,
I'm getting an error "cannot convert type system.windows.forms.control to telerik.wincontrols.ui.radcarousel" when I try to convert a control to a radcarousel. Basically, this is the code (some code is missing but are irrelevant for this example):
foreach (Control control in listOfControls)
{
if (c.getType() == button)
listOfNames = control.Name;
if(c.getType() == ToolStrip)
{
ToolStrip t = (ToolStrip)control; //here I have no problem when I try to cast a control to a ToolStrip control
foreach (ToolStripItem tsi in t.Items) {...}
}
if(c.getType() == RadCarousel)
{
RadCarousel r = (RadCarousel)control; //here I get the error
foreach (RadButtonElement rbe in r.Items) {...}
}
}
Thanks
I'm getting an error "cannot convert type system.windows.forms.control to telerik.wincontrols.ui.radcarousel" when I try to convert a control to a radcarousel. Basically, this is the code (some code is missing but are irrelevant for this example):
foreach (Control control in listOfControls)
{
if (c.getType() == button)
listOfNames = control.Name;
if(c.getType() == ToolStrip)
{
ToolStrip t = (ToolStrip)control; //here I have no problem when I try to cast a control to a ToolStrip control
foreach (ToolStripItem tsi in t.Items) {...}
}
if(c.getType() == RadCarousel)
{
RadCarousel r = (RadCarousel)control; //here I get the error
foreach (RadButtonElement rbe in r.Items) {...}
}
}
Thanks