.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

select all row in gridview using checkbox

Posted By: Catherine     Posted Date: May 19, 2011    Points:5   Category :VB.Net
hi i would like to select all row in gridview using check box. when i selected all row at a time in check box(all rows selected with tick mark) then press delete button. all row should be deleted with confirmation message. is there any select all option in gridview .I am using vb.net.

Responses
Author: Maverick             
Posted Date: May 23, 2011     Points: 20   

Hello,

Use the following javascript

function CheckChangedForSDP() {
var frm = document.forms[0];
var boolAllChecked;
boolAllChecked = true;
for (i = 0; i < frm.length; i++) {
e = frm.elements[i];
if (e.type == 'checkbox') {

if (e.checked == false) {
boolAllChecked = false;
break;
}
}
}
}

Hope it helps.

Thanks,
Maverick


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend