CheckAll/Uncheck all
-
I have a gridview that contains a checkbox for a user to select his choice. I want a code that enables user to check all and uncheck the check box at ones I am using ASP.net and C_sharp.And this should be done with out postback. Please advice
-
I have a gridview that contains a checkbox for a user to select his choice. I want a code that enables user to check all and uncheck the check box at ones I am using ASP.net and C_sharp.And this should be done with out postback. Please advice
javascript will solve it!! but one thing,the id of the controls inside the gridview is different from the server controls!!!! In the page check the id of the checkboxes with viewsource of the page!!! Write the javascript accordingly!!!! Hope itll help!!!
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
javascript will solve it!! but one thing,the id of the controls inside the gridview is different from the server controls!!!! In the page check the id of the checkboxes with viewsource of the page!!! Write the javascript accordingly!!!! Hope itll help!!!
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
Could you give me a code in javascript and how to incorporate in in to my ASP.net,C sharp? I havent used Javascript before. Thanks for your help
FUNCTION FUNC_NAME() { VAR CHK=DOCUMENT.GETELEMENTBYID("CHECK BOX NAME"); VAR COUNT="COUNT_OF_CHECKBOXES"; WHILE(COUNT>0) { IF(CHK.CHECKED==TRUE) { CHK1.CHECKED=TRUE; } ELSE { CHK1.CHECKED=FALSE; } } IN THE CODE CHECK_ALL_CHECK_BOX.ATTRIBUTES.ADD("ONCLICK","RETURN FUNC_NAME();"); HOPE IT HELPS!!!!
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--
-
FUNCTION FUNC_NAME() { VAR CHK=DOCUMENT.GETELEMENTBYID("CHECK BOX NAME"); VAR COUNT="COUNT_OF_CHECKBOXES"; WHILE(COUNT>0) { IF(CHK.CHECKED==TRUE) { CHK1.CHECKED=TRUE; } ELSE { CHK1.CHECKED=FALSE; } } IN THE CODE CHECK_ALL_CHECK_BOX.ATTRIBUTES.ADD("ONCLICK","RETURN FUNC_NAME();"); HOPE IT HELPS!!!!
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--