我想将gridview记录转移到另一个gridview。
实际上我在第一个gridview中放置了一个复选框列。现在我想要的是当我选择任何行的复选框时,相关行转移到第二个gridview,当我取消选择该行时,它返回到第一个gridview中的先前位置。enter code here
gridview 1:
gridview 2:
<asp:GridView ID="Gridsales" runat="server" AutoGenerateColumns="False" AutoGenerateSelectButton="True"
BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
CellPadding="3" DataKeyNames="I_AUTONO" ForeColor="Black" GridLines="Vertical"
onselectedindexchanged="Gridsales_SelectedIndexChanged">
<AlternatingRowStyle BackColor="#CCCCCC" />
<Columns>
<asp:BoundField DataField="I_AUTONO" HeaderText="SNO" />
<asp:BoundField DataField="I_INVOICENO" HeaderText="ITEM INVOICENO" />
<asp:BoundField DataField="I_CODE" HeaderText="ITEM CODE" />
<asp:BoundField DataField="I_NAME" HeaderText="ITEM NAME" />
<asp:BoundField DataField="I_QTY" HeaderText="ITEM QTY" />
<asp:BoundField DataField="I_UNIT" HeaderText="ITEM UNIT" />
<asp:BoundField DataField="I_RATE" HeaderText="ITEM RATE" />
<asp:BoundField DataField="I_AMOUNT" HeaderText="ITEM AMOUNT" />
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />
</asp:GridView>