简体   繁体   English

DataGridView 在 Visual Studio 2019 工具箱上不可用

[英]DataGridView not avaiable on Visual Studio 2019 ToolBox

I'm new to Visual Studio and in trying to follow a tutorial I can't seem to find the DataGridView on the ToolBox for Windows Forms.我是 Visual Studio 的新手,在尝试学习教程时,我似乎无法在 Windows Forms 的工具箱上找到 DataGridView。 I understand I can go to "Choose Toolbox Items" to select what I want but even then when I try to drag and drop the DataGridView it doesn't allow me to drop it.我知道我可以 go 来“选择工具箱项目”到 select 我想要的,但即使那样,当我尝试拖放 DataGridView 时,它也不允许我放下它。

I don't understand it because in every tutorial I watch this seems to be a pretty straightforward operation.我不明白,因为在我观看的每个教程中,这似乎都是一个非常简单的操作。 If this is not possible, or if this is not the control I should be using, what is the other option to display a datatable on windows forms?如果这是不可能的,或者如果这不是我应该使用的控件,那么在 windows forms 上显示数据表的其他选项是什么?

Any help is appreciated.任何帮助表示赞赏。

在此处输入图像描述

Here is the fix:这是修复:

  1. Trying adding using System.Windows.Forms;尝试using System.Windows.Forms; . . From.Net Framework only.仅来自 .Net 框架。

OR或者

  1. After watching your image I think that it is a fresh project.看了你的照片后,我认为这是一个新鲜的项目。 So, create a new project.因此,创建一个新项目。 (Windows Form App(.Net Framework)), don't use.Net Core (still in progress as @JhonG said). (Windows Form App(.Net Framework)),不要使用.Net Core(正如@JhonG所说,仍在进行中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM