MA
Mahendran
Syncfusion Team
February 25, 2011 07:11 AM UTC
Hi Samantha ,
Thanks for your interest in Syncfusion Products.
To avoid this casting error you have to remove the below code from FormDesigner code and have to use in Form Load event. This is because the value of Controls[0] is cannot be recognized in designer mode. This works fine after initialization is done. The following code explains the same.
Code snippet [C #]
private void Form1_Load(object sender, EventArgs e)
{
if ((Syncfusion.Windows.Forms.Grid.GridControl)this.monthCalendarAdv1.Controls[0] is GridControl )
((Syncfusion.Windows.Forms.Grid.GridControl)this.monthCalendarAdv1.Controls[0]).WantTabKey = false;
}
Please let us know if you have any concerns.
Regards,
R.Mahendran