i have 2 gridview. i put this java script for chekbox, my id is [email]<<Email Snipped>>[/email] plz help me , if u knw the ans thn plz reply me , thank you
<script type="text/javascript">
// Let's use a lowercase function name to keep with JavaScript conventions
function selectAll(invoker) {
// Since ASP.NET checkboxes are really HTML input elements
// let's get all the inputs
var inputElements = document.getElementsByTagName('input');
for (var i = 0 ; i < inputElements.length ; i++) {
var myElement = inputElements[i];
// Filter through the input types looking for checkboxes
if (myElement.type === "checkbox") {
// Use the invoker (our calling element) as the reference
// for our checkbox status
myElement.checked = invoker.checked;
}
}
}
</script>
in design view //
i added template like this ,,,,
<asp:TemplateField>
<AlternatingItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</AlternatingItemTemplate>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
<HeaderTemplate>
<asp:CheckBox ID="cbSelectAll" runat="server" Text="Select All" OnClick="selectAll(this)" />
</HeaderTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
<FooterTemplate>
<asp:LinkButton ID="lnkMoveSelected" runat="server" CommandName="MoveSelected">Move Selected</asp:LinkButton>
</FooterTemplate>
</asp:TemplateField>
..
upto this everythng is goin fine , main prblem is now what shuld i do to move/ transfer selected checkbox items from gridview1 to gridview 2 by clicking that linkbutton or any button outside gridview,... plz give me solution in details thank u ,..
[email]<<Email Snipped>[/email] plz reply me on my id or here in private msg thnk you ..