日期:2014-05-17  浏览次数:20565 次

急!gridview加RadioButton
HTML code

<div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
            CellPadding="3" CellSpacing="1" DataKeyNames="ID" 
            DataSourceID="AccessDataSource1" GridLines="None">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="pyear" HeaderText="计划年度" SortExpression="pyear" />
                <asp:BoundField DataField="pnumber" HeaderText="计划编号" 
                    SortExpression="pnumber" />
                <asp:BoundField DataField="ptype" HeaderText="计划类型" SortExpression="ptype" />
                <asp:BoundField DataField="punit" HeaderText="申报单位" SortExpression="punit" />
                <asp:BoundField DataField="pwman" HeaderText="填报人" SortExpression="pwman" />
                <asp:BoundField DataField="pphone" HeaderText="联系电话" SortExpression="pphone" />
                <asp:BoundField DataField="pwdate" HeaderText="填报日期" SortExpression="pwdate" />
                <asp:BoundField DataField="pstate" HeaderText="审核状态" SortExpression="pstate" />
                <asp:BoundField DataField="premark" HeaderText="备注" SortExpression="premark" />
                <asp:TemplateField HeaderText="审核">
                    <ItemTemplate>
                        <asp:RadioButton ID="yesBtn" runat="server" Text="通过" GroupName="shenhe"
                             AutoPostBack="True" />
                        <asp:RadioButton ID="noBtn" runat="server"  Text="不通过" GroupName="shenhe"
                             AutoPostBack="True" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#594B9C" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#33276A" />
        </asp:GridView>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/fac.accdb" SelectCommand="SELECT * FROM [fpbasic]">
        </asp:AccessDataSource>
    
    </div>
    <div>
        <asp:Button ID="ButSubmit" runat="server" Text="提交" />
    </div>



这样应该怎么写后台代码,当我点提交的