title: How to Inherit from Existing Windows Forms Controls in C++/CLI with Designer
body: <p>I need a custom DataGridView class in c++/cli in visual studio 2012 that can be used in Designer View.</p>
  
  <p>I created a default clr user inheriting from System::Windows::Forms::UserControl, and changed UserControl to DataGridView, but it didn't work here in C++. It works in C#. [1] </p>
  
  <p>Nor codes from scratch were recognized by the Designer. [2]</p>
  
  <p>It seems like I have to put the DataGridView in the class, but I will have to access its members like grid->view->GetName.. instead of grid->GetName.. now. And it wouldn't be patternized, as what CLR was intended to be after all these weird syntaxes.</p>
  
  <p>[1] <a href="http://msdn.microsoft.com/en-us/library/7h62478z.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/7h62478z.aspx</a></p>
  
  <p>[2] <a href="https://stackoverflow.com/questions/3208660/adding-a-user-control-using-windows-form-designer">Adding a user control using Windows Form designer</a></p>