josna jose

josna jose

  • NA
  • 6
  • 1.4k

Move checked items of GridView to another GridView?

Nov 24 2015 8:42 AM
I am moving selected rows from 1st gridview to 2nd gridview and when I deselect row from 2nd gridview , move the deselected row to 1st gridview from 2nd gridview using jquery Don't know how i will do it. Please Help
 
 
Ex given ishttp://jsfiddle.net/prajan55/maLqV/
 
My aspx code is. 
     
<div class="col-md-12 divStyle">
<div class="col-md-4 icon">
<div class="row top-Image"></div>
<div class="textBlueColor" style="font-size: 14px; padding-left: 25%;">Company Names</div>
<div class="row top-Margin"></div>
<input type="text" placeholder="Find" id="txtSearchCompany" class="textboxborder" />
<div class="textboxWidth grdStyle">
<asp:GridView ID="gvCompanyListing" runat="server" AutoGenerateColumns="False" ShowHeader="False" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="cbSelect" CssClass="gridCB" runat="server" ItemStyle-Width="10%"></asp:CheckBox>
<%-- <asp:CheckBox ID="CheckBox1" CssClass="gridCB" runat="server" ItemStyle-Width="10%" Text='<%# Eval("CompanyInfo") %>' onclick="addval(this)"></asp:CheckBox>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CompanyInfo" SortExpression="CompanyInfo" ItemStyle-Width="92%" ItemStyle-Height="1px"></asp:BoundField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="col-md-1 rightArrowStyle">
<img src="images/icon_RightArrow.png" alt="RightArrow" /></div>
<div class="col-md-4">
<div class="row Bottom-Padding"></div>
<div class=" textBlueColor txtStyle">Companies Selected</div>
<div class="row top-Margin"></div>
<%-- <div class="lblContainer icon2">--%>
<%-- <asp:CheckBoxList runat="server" ID="checkSelected" CssClass="gridCB" ItemStyle-Width="10%" onclick="return false;"></asp:CheckBoxList>
</div>--%>
<div class="textboxWidth grdStyle">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowHeader="False" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="cbUnSelect" CssClass="gridCB" runat="server" ItemStyle-Width="10%"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CompanyInfo" SortExpression="CompanyInfo" ItemStyle-Width="92%" ItemStyle-Height="1px"></asp:BoundField>
</Columns>
<EmptyDataTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="330px">
<tr class = "trEmpty">
<td style="width: 30px; text-align: center" colspan="3">
No Records found
</td>
</tr>
</table>
</EmptyDataTemplate>
</asp:GridView>
</div>
</div>
</div>

Answers (2)