Search code examples
c#wpfdatagridviewvisual-studio-community

How do I add the DataGridView component to Visual Studio Community and my project


I want to use the DataGridView in my WPF project. I see it in my toolbox list but it is inactive. I cannot figure out how to activate it and make available to my project.


Solution

  • I see it in my toolbox list but it is inactive.

    DataGridView is a windows forms control and can not be used in a WPF window directly. For a WPF project you need to use DataGrid control.

    You should right click on toolbox and uncheck Show All, this way you will see just those components which are available for the current open designer.