日期:2014-05-17 浏览次数:20462 次
<Columns>
<asp:BoundColumn ReadOnly="true" DataField="A">
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="B">
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="类型">
<ItemTemplate>
<%# ShowType(DataBinder.Eval(Container.DataItem,"TypeName").ToString()) %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" ID="Dropdownlist1" AutoPostBack="true" OnSelectedIndexChanged="Dropdownlist1_SelectedIndexChanged" ></asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:EditCommandColumn CancelText="取消" EditText="编辑" UpdateText="更新"></asp:EditCommandColumn>
public void edit(object sender, DataGridCommandEventArgs e)
{
DropDownList list1 = (DropDownList)dgVidicon.Items[e.Item.ItemIndex].Cells[2].Controls[0];
}