Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将RecID字段分配给Gridview TemplateField(Checbox列)_C#_Asp.net_.net 3.5_Gridview - Fatal编程技术网

C# 将RecID字段分配给Gridview TemplateField(Checbox列)

C# 将RecID字段分配给Gridview TemplateField(Checbox列),c#,asp.net,.net-3.5,gridview,C#,Asp.net,.net 3.5,Gridview,我想给复选框列“cbPOID”分配一个RecID。正在我的数据集中返回的RecID字段,但不应显示在gridview中 <asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="False" CellPadding="4" GridLines="None" Width="100%" AllowPaging="True" PageSize="20" onpageindexc

我想给复选框列“cbPOID”分配一个RecID。正在我的数据集中返回的RecID字段,但不应显示在gridview中

<asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="False" CellPadding="4" GridLines="None" Width="100%" AllowPaging="True" PageSize="20"     
                    onpageindexchanging="gvOrders_PageIndexChanging" ForeColor="#333333">    
                    <Columns>    
                        <asp:TemplateField HeaderText="VerifiedComplete" >    
                            <ItemTemplate>    
                                <asp:CheckBox ID="cbPOID" runat="server"/>    
                            </ItemTemplate>    
                        </asp:TemplateField>
            <asp:BoundField DataField="Rec_ID" HeaderText="Rec_ID" HtmlEncode="False"></asp:BoundField>
                        <asp:BoundField DataField="PurchaseOrderID" HeaderText="PurchaseOrderID" HtmlEncode="False" ></asp:BoundField>    
                        <asp:BoundField DataField="VENDOR_ID" HeaderText="Vendor ID"></asp:BoundField>    
                        <asp:BoundField DataField="VENDOR_NAME" HeaderText="Vendor Name"></asp:BoundField>    
                        <asp:BoundField DataField="ITEM_DESC" HeaderText="Item Desc"></asp:BoundField>    
                        <asp:BoundField DataField="SYS_DATE" HeaderText="System Date"></asp:BoundField>    
                    </Columns>    
                    <FooterStyle CssClass="GridFooter" BackColor="#990000" Font-Bold="True" ForeColor="White" />    
                    <PagerStyle CssClass="GridPager" ForeColor="#333333" BackColor="#FFCC66" HorizontalAlign="Center" />    
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />    
                    <HeaderStyle CssClass="GridHeader" BackColor="#990000" Font-Bold="True" ForeColor="White"  />    
                    <RowStyle CssClass="GridItem" BackColor="#FFFBD6" ForeColor="#333333" />    
                    <AlternatingRowStyle  CssClass="GridAltItem" BackColor="White" />    
</asp:GridView>

可能是这样的:

<asp:CheckBox ID="cbPOID" runat="server" Value='<%# Eval("RecID") %>'/>