Cannot select a GridView control from Visual Studio if in <asp: table>

I am sure that this is probably really stupid that I do not notice. I cannot select / select any GridView controls in Visual Studio 2010 when they are inside an asp: table element. If I move the GridView outside the asp: table element, I can select it and see the properties in the properties window.

When a control is in a table element, it does not appear in the designer (but when the site starts) and does not appear in the properties window. See screenshot. Any ideas? I looked through almost all the options in Visual Studio, but I can not find the one that will be applied.

This is not a coding problem, since the grid itself works great - that's why the code is not sent here.

Any thoughts?

Edit - this will not allow me to post a screenshot, so I will send the link

http://i.stack.imgur.com/lfO86.jpg

+3
source share
3 answers

welcome to VS2010 ... and everyone else VS: D

what you can do is go to the source code, scroll to the desired item and just click on it with the tag. it should be displayed in the properties window on the right for editing.

+1
source

You cannot access it because it becomes part of the collection of table controls, just as you cannot directly access the TextBoxin the GridView column.

You have two options:

  • Use a plain HTML table instead
  • Use the method FindControl()to access GridViewin code

() . , , , ; , .

+2

In the original view, use <table>instead of <asp:Table>and <tr>, <td>for rows and tabular data instead of <asp:TableRow>and, <asp:TableCell>respectively. You can then select the internal controls of this table in the design view.

+1
source

All Articles