CODE: Adding a Checkbox to Check/Uncheck all issues in Batch Update
I have come up with some code to add functionality to the Batch Issues command. Sometimes, I want to choose specific issues from a filter instead of filtering the data first. I added 2 things. The first is an input object to handle the checkbox click, the second is javascript to uncheck/check the items in a checkboxlist.
Here is how you do it:
Add this code after line 17
....
<script language="javascript" src="../DCheck.js"></script>
<script language="JavaScript">
<!--
function readListControl()
{
var objSelectAll = document.getElementById('chkSelectAll');
var objSpan = document.getElementById('chklstIssues');
for (var j=0; j<objSpan.childNodes.length; j++)
{
var objCurrentControl = objSpan.childNodes[j];
if (objCurrentControl.id != null)
objCurrentControl.checked = objSelectAll.checked;
}
}
// -->
</script>
..
Then the definition of the checkbox and checkbox list should look like this:
....
<tr>
<td height="100%" vAlign="top" align="center">
<input type="checkbox" id="chkSelectAll" checked onclick='readListControl()' /> Check/Uncheck All<br /><br />
<TABLE id="Table1" cellSpacing="0" cellPadding="5" align="center" border="0" height="100%">
<tr>
<td valign="top">
<asp:CheckBoxList id="chklstIssues" runat="server" Width="100%" Font-Size="Smaller" RepeatLayout="Flow"></asp:CheckBoxList>
</td>
</tr>
</TABLE>
....
Hope this helps out!
~S
|
Underwhelmed
· 1 |
|
| Thursday, December 14, 2006, 9:33:43 PM | |




