0

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 ..

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by Atli
1

If you can't even be bothered to comply with the guidelines you agreed to when creating your account, or even the simple requests written all over the page where you wrote your posts, why would I want to help you?

You get what you give, which in this case is nothing but disrespect.

All the best...

P.S.
Whoops... meant this to be a response to the PM he sent me... O well xD

Edited by Atli: n/a

Votes + Comments
Words!
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.