“选择”是GridView中自带的选择按钮
<asp:GridView ID="gvMaterial" runat="server" Width="100%" SkinID="gv"
AutoGenerateColumns="False" onrowdatabound="gvMaterial_RowDataBound"
style="margin-bottom: 0px; margin-right: 0px;" >
<Columns>
<asp:BoundField DataField="MaterialID" HeaderText="物料编码"><HeaderStyle Width="10%"/>
<ItemStyle Width="10%" HorizontalAlign="Center" /></asp:BoundField>
<asp:BoundField DataField="MaterialName" HeaderText="物料名称"><HeaderStyle Width="25%" />
<ItemStyle Width="25%" HorizontalAlign="Left" /></asp:BoundField>
<asp:BoundField DataField="Spec" HeaderText="型号规格"><HeaderStyle Width="30%" />
<ItemStyle Width="30%" HorizontalAlign="Left" /></asp:BoundField>
<asp:BoundField DataField="MaterialSymbol" HeaderText="助记符"><HeaderStyle Width="10%" />
<ItemStyle Width="10%" HorizontalAlign="Left" /></asp:BoundField>
<asp:TemplateField HeaderText="类别名称">
<EditItemTemplate>
<asp:TextBox ID="txtMTypeName" runat="server" Text='<%# Eval("MTypeID") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblMTypeName" runat="server" Text='<%# Eval("MTypeID") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="15%" />
<ItemStyle Width="15%" HorizontalAlign="Center" />
</asp:TemplateField>
<asp:CommandField ShowSelectButton="True" ><HeaderStyle Width="10%" />
<ItemStyle Width="10%" HorizontalAlign="Center" />
</asp:CommandField>
</Columns>
</asp:GridView>
我怎么去触发那个事件呢?不好意思,我脑袋不是很会转!