当前位置:编程学习 > C#/ASP.NET >>

怎样实现对gridview中某行的修改,代码如下:

<asp:GridView ID="gvPO" runat="server" AutoGenerateColumns="false" AllowPaging="True"
                PageSize="10" Width="100%" OnRowCommand="gvPO_RowCommand" BorderWidth="1px" BorderColor="#aaaaaa">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                <tr bgcolor="#ECE9D8" align="center">
                                    <td height="20" width="3%" align="center">
                                        NO.</td>
                                    <td width="9%">
                                        POID<br />
                                        (订单号)</td>
                                    <td width="8%">
                                        申请号码</td>
                                    <td width="10%">
                                        客户订单</td>
                                    <td width="15%">
                                        Supplier<br />
                                        (供应商)</td>
                                    <td width="10%">
                                        总金额</td>
                                    <td width="9%">
                                        applicant<br />
                                        (申请人)</td>
                                    <td width="9%">
                                        Buyer<br />
                                        (采购)</td>
                                    <td width="9%">
                                        Terms<br />
                                        (交货时间)</td>
                                    <td width="10%" align="center">
                                        Status<br />
                                        (状态)</td>
                                    <td width="8%" align="center">
                                        Print<br />
                                        (打印)</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td height="1" colspan="11">
                                    <div class="line">
                                    </div>
                                </td>
                            </tr>
                            <tr align="center" class="normal">
                                <td align="center" height="20">
                                    <%#Container.DisplayIndex + 1%>
                                </td>
                                <td>
                                    <asp:Label ID="lblPOID" runat="server" Text='<%#Eval("POID") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblOrderID" runat="server" Text='<%#Eval("OrderID") %>'></asp:Label></td>
                                <td>
                                    <asp:Label ID="LabelType" runat="server" Text='<%#Eval("Type") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblSupplier" runat="server" Text='<%# Eval("CompanyName") %>' ClientIDMode="Predictable"></asp:Label>
                                    <asp:Label ID="lblSpID" runat="server" Text='<%#Eval("SpID") %>' Visible="false"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblAmount" runat="server" Text='<%#Eval("Amount","{0:#,###0.00}") %>'></asp:Label>    </td>
                                <td>
                                    <asp:Label ID="lblRequirer" runat="server" Text='<%#Eval("Requirer") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblBuyer" runat="server" Text='<%#Eval("FirstName")+" "+Eval("LastName") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblDate" runat="server" Text='<%#GetDates(Eval("PayDate"))%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="lblStatus" runat="server" Text='<%#GetStatus(Eval("st1").ToString,Eval("st2").ToString,Eval("IsActivation").tostring)%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:LinkButton ID="lbtnPrint" runat="server" Text="1" CommandArgument='<%#Eval("POID") %>'
                                        CommandName="view"></asp:LinkButton>
                                </td>
                                  <td align="center">
                                    <asp:LinkButton ID="lbtnUpdate" runat="server"  Text="Update"   CommandArgument='<%# Eval("POID") %>'
                                        CommandName="update" onclick="lbtnUpdate_Click"  ></asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate> GridView --------------------编程问答-------------------- 主要是实现对供应商的修改
补充:.NET技术 ,  VB.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,