Share via


Tool box items grayed out

Question

Friday, June 2, 2017 6:11 PM

I am using VS 2017 and I am trying to add a data grid view to an asp form. It is grayed out. Most of the tools in the tool box are grayed out. How can I access them?

All replies (3)

Sunday, June 4, 2017 1:42 AM

Anyone?


Monday, June 5, 2017 6:26 AM

Hi Quarinteen,

Welcome to the MSDN forum.

>> I am using VS 2017 and I am trying to add a data grid view to an asp form.

Do you mean the GridView control under Data in the Toolbox windows, right? If so, I tested it on my side and it works fine as below:

Please have a try with the following to troubleshot this issue:

  1. Right click on the Toolbox windows and choose ‘Reset Toolbox’, restart the VS
  2. Right click on the Toolbox windows and choose ‘Choose Items…’, under ‘.NET Framework Components’ tab and make sure the ‘GridView’ option is checked.
  3. Re-run the VS 2017 installer as administrator, click the icon beside ‘Launch’ and choose ‘Repair’

If you mean when you right click in the Toolbox windows and ‘Show All’. The ‘DataGridView’ control display, but it is disabled, since it is a Windows Forms control, please check this: DataGridView Control (Windows Forms).

Meanwhile, I discussed the DataGridView control with our colleague who are support the ASP.NET development forum, he also confirmed that the DataGridView control cannot use in the ASP.NET Web form project, since it is a windows forms control, sorry for this inconvenience and thank you for your understanding.

Best regards,

Sara

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].


Tuesday, June 13, 2017 6:46 AM

Hi Quarinteen,

Sorry to trouble you and I just want to confirm does your issue is solved or not? If not, please share the detail information in here and I will help you to research it.

For the ‘DataGridView’ control, it is a Windows Forms control and since your project type is ASP.NET Web Forms, so you cannot use it. You can right-click on toolbox uncheck ‘Show All’ to hide those controls which is not available for your current project type, so it will not make you wonder why it is gray out.

If you mean ‘GridView’ control is not available, you can have a try with those troubleshot methods in my previous reply and check if it works or not.

For more questions about the ASP.NET Web forms application, you can redirect to this appropriate forum: https://forums.asp.net/18.aspx/1?Web+Forms to seek for a more professional support, thank you for your understanding.

BTW, if you think my reply is helpful and please mark it as answer and that will help other community members who meet the same or similar issue to easier search this information.

Best regards,

Sara

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].