问题描述
<asp:GridViewID="GridView1"runat="server"CellPadding="4"ForeColor="#333333"Width="100%"GridLines="None"AutoGenerateColumns="False"DataKeyNames="WAREHOUSECODE"onrowcommand="GridView1_RowCommand"onrowdatabound="GridView1_RowDataBound"><RowStyleBackColor="#F7F6F3"ForeColor="#333333"/><Columns><asp:ButtonFieldText="SingleClick"CommandName="SingleClick"Visible="false"/><asp:ButtonFieldText="DoubleClick"CommandName="DoubleClick"Visible="false"/><asp:BoundFieldDataField="WHRECEIPTCODE"HeaderText="进仓编号"><ItemStyleCssClass="juzuo"/></asp:BoundField><asp:BoundFieldHeaderText="客户编号"DataField="CLIENTCODE"><ItemStyleCssClass="juzuo"/></asp:BoundField><asp:BoundFieldHeaderText="业务编号"DataField="WAREHOUSECODE"><ItemStyleCssClass="juzuo"/></asp:BoundField><%--<asp:BoundFieldHeaderText="东方编号"DataField="WORKCODE"/>--%><asp:BoundFieldHeaderText="提单号"DataField="BLCODE"><ItemStyleCssClass="juzuo"/></asp:BoundField><asp:BoundFieldHeaderText="件数"DataField="COUNT_1"><ItemStyleCssClass="juyou"/></asp:BoundField><asp:BoundFieldHeaderText="毛重"DataField="UNITWEIGHT"><ItemStyleCssClass="juyou"/></asp:BoundField><asp:BoundFieldHeaderText="体积"DataField="CUBE_1"><ItemStyleCssClass="juyou"/></asp:BoundField><asp:BoundFieldHeaderText="品名"DataField="CARGONAME_1"><ItemStyleCssClass="juzuo"/></asp:BoundField><asp:BoundFieldHeaderText="仓位号"DataField="PositionCode"><ItemStyleCssClass="juzuo"/></asp:BoundField><asp:ButtonFieldButtonType="Button"Text="部分出仓"CommandName="SomeOut"/></Columns><FooterStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/><PagerStyleBackColor="#284775"ForeColor="White"HorizontalAlign="Center"/><SelectedRowStyleBackColor="#E2DED6"Font-Bold="True"ForeColor="#333333"/><HeaderStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/><EditRowStyleBackColor="#999999"/><AlternatingRowStyleBackColor="White"ForeColor="#284775"/></asp:GridView>里面会有多个客户编号,但是我想根据一个客户边编号去除相应的数据?
解决方案
解决方案二:
没有人回答啊,,只是移除不是删除
解决方案三:
是永久移除还是用JS影藏?
解决方案四:
引用2楼的回复:
是永久移除还是用JS影藏?
就是不再这个list集合里面
解决方案五:
直接在list里移除不就就行了
解决方案六:
引用4楼的回复:
直接在list里移除不就就行了
for(inti=0;i<list.Count;i++){if(list[i].WORKCODE==ViewState["WAREHOUSECODE"].ToString()){list.RemoveAt(i);}}这个不行一次值能删除一行,我想删除一个对象list[i].WORKCODE都删除掉。