比如:我有一个表有:姓名、性别、年龄等字段。现在,要实现GridView的编辑。我在这想用DropDownList去选择性别。那么在Grid View中把性别这个字段转换为TemplateFied(在GridView任务编辑中),然后开始编辑模板如图中在EditItemTemplate中加入DropDownList,但是会发现在运行点编辑的时候DropDownList并不会如愿的呆在想编辑的地方,无论你点哪一行,它总是不变的呆在一个地方,也点是你在编辑页面时拖的地方,要怎么把它放在编辑的地方呢?我们打开html,会找到加入DropDownList下面的代码:
<EditItemTemplate> &nbsp;<asp:DropDownList ID="DropDownList1" runat="server" Style="z-index: 100; left: 59px;    position: absolute; top: 229px" Width="120px">        </asp:DropDownList> </EditItemTemplate>
这时最后一步了,我们去掉后面的style,把它改成:
<EditItemTemplate> &nbsp;<asp:DropDownList ID="DropDownList1" runat="server" >        </asp:DropDownList> </EditItemTemplate> 
OK,大功告成了,恭喜恭喜~~~