Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i finally figured out how to get a checkbox into a datagrid and how to determine if the box is checked or not.

my problem now is this:

 

The list is long (about 287 entries)

each entry has a check box and i need to have a button to select all or deselect all.

 

..........any ideas

Posted

Here is the answer

 

Well since no one has the answer to this question i had to find it somewhere else so the answer is as follows

 

 

 

 

asp code:

 

 

<script language = "javascript">

 

Function checkall(o){

for (var i = 0; i < document.myForm.elements.length; i++) {

if (document.forms[0].elements.type == "checkbox") {

document.forms[0].elements.checked = o.checked;

}

}

}

 

</script>

 

 

.......

this is part of the header of the datagrid - and it will check and uncheck every checkbox on the form.

 

<input type = "checkbox" onclick = "javascript:checkall(o)">

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...