Click here to Skip to main content
15,891,033 members

Comments by FelipeVazquez (Top 3 by date)

FelipeVazquez 7-Feb-13 15:10pm View    
it's that obvious?
Thanks for your answer, helped me see it from another angle
FelipeVazquez 7-Feb-13 14:59pm View    
I have a div that opens and closes with this function, and a button that updates an updatepanel, I want the div is closed by pressing the button without the page is updated
I put this code on the button event
Page.ClientScript.RegisterStartupScript(Me.GetType(), "toggle", "Ocultar();", True)
but does not work
thanks for your help

pd: sorry for my english
FelipeVazquez 21-Mar-12 12:56pm View    
thanks for your answers,
Nilesh i use your code, but isnt work for me
i have this... can you tell me if I'm doing something wrong

<pre lang="Javascript">
<script language="javascript" type="text/javascript">
function CheckAll(checkboxId, index) {
var grid = document.getElementById('gvDatos0');

if (grid.rows.length > 0) {
//loop starts from 1. rows[0] points to the header.
for (i = 1; i < grid.rows.length; i++) {
//get the reference of first column
if (index > 0) {
cell = grid.rows[i].cells[index];
for (j = 0; j < cell.childNodes.length; j++) {
//if childNode type is CheckBox
if (cell.childNodes[j].type == "checkbox") {
//assign the status of the Select All checkbox to the cell checkbox within the grid
cell.childNodes[j].checked = checkboxId.checked;
}
}

}
}
}
}
</script>

</pre>

<pre lang="HTML">
<asp:GridView ID="gvDatos0" runat="server" AutoGenerateColumns="False"
HorizontalAlign="Center" Width="850px">
<columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="chkHeader" runat="server" ToolTip="Check All" onclick="return CheckAll(chkHeader,columnNo);" />

</HeaderTemplate>
<itemtemplate>
<asp:CheckBox ID="chbMercado" runat="server" class="chkSel" />

</pre>