C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Selecting all Check Boxes in a Grid View


Posted Date: 09 Sep 2008    Resource Type: Code Snippets    Category: Javascript

Posted By: ANIL PANDEY       Member Level: Diamond
Rating:     Points: 10



here is the java script code for selecting all the check Boxes Column in a Grid View..


function SelectAll()
{
var RowCount=null;
var ctl = 'grdAdmin_ctl';
RowCount=<%= grdAdmin.Rows.Count %>; //Getting number of rows in gridview
for(var i=2;i<=RowCount+1;i++)
{
var ChkId=null;
if (i<=9)
{
ChkId=document.getElementById(ctl+ '0' + i + '_chkSelect');
ChkId.checked=true;
}
else
{
ChkId=document.getElementById(ctl + i + '_chkSelect');
ChkId.checked=true;
}
}
return false;
}



Regards,
Anil Pandey





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Selecting all Check Boxes  .  Javascript  .  Gridview  .  Checkbox  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Validatin date in MM/DD/YY Format using javascript
Previous Resource: Characters Count in a Text Box
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

silicone halloween masks

Contact Us    Privacy Policy    Terms Of Use