Hi Every One
i have one grid view in first column of grid view i have one check box
my question is how to check the check box is checked or unchecked at least one should checked when user click the accept or decline button which is out side the gird i mean the accept or decline out side the grid i would like to do this at client side i mean through java script
thanks in advance
Loading
mohdazeemuddin ahmedPosted Oct 27, 2009, 4:29 AM
Nilanka DharmadasaPosted Oct 27, 2009, 4:21 AM
As I understand, the reson is when you check the check box, it doent post back to the server.
Set checkbox.AutoPostBack = true;
So this will automatically post the state back to the server when it is clicked.
If my answer helps you, please accept it. It will help me a lot.
mohdazeemuddin ahmedPosted Oct 27, 2009, 2:38 AM
if i checked the check box then also its given me value false can you tell me were i am doing mistake
naura paxPosted Oct 27, 2009, 1:55 AM
that was a sample code you can directly write
if(..getelementbyid(id).Checked==true) in your javascript function where you want to do some conditional checking.
id refers to checkbox control as seen web page when you do right click on page and select "View Source".
mohdazeemuddin ahmedPosted Oct 27, 2009, 1:40 AM
naura paxPosted Oct 26, 2009, 6:46 AM
<script type="text/javascript">
function SelectAll(id) {
var frm = document.forms[0];
for (i=0;i if (frm.elements[i].type == "checkbox") {
if(document.getElementById(id).checked==true)
{
//your code
}
}