Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I created a Generic User Control with following signature..

C#
public partial class GridMastercontrol<TMainEntity, TChildEntity> : UserControl
where TMainEntity : class
where TChildEntity : class
{
// more code here
}


A reference is created as follows-

C#
GridMastercontrol<STACS.ACASupp,STACS.ACALot> ctlMasterACA=new GridMastercontrol<STACS.ACASupp,STACS.ACALot>();


The control works perfectly on run-time. But, when i open the designer the design is not displayed and the following two warnings popup-

Warning 1- Could not find type 'WindowsFormsControlLibrary1.GridMastercontrol'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

Warning 2- The variable 'ctlMasterACA' is either undeclared or was never assigned.

It was working perfectly in design mode when i did not implement the generics concept into it. but now, it does not. :(

Please help me.. Thanks in advance :)
Posted
Updated 2-Apr-13 5:34am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900