Click here to Skip to main content
15,925,602 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Can we assign control to validate as Label? Pin
Pawan Kiran27-May-09 23:06
Pawan Kiran27-May-09 23:06 
AnswerRe: Can we assign control to validate as Label? Pin
DJ Matthews28-May-09 3:07
DJ Matthews28-May-09 3:07 
GeneralRe: Can we assign control to validate as Label? Pin
Pawan Kiran28-May-09 22:40
Pawan Kiran28-May-09 22:40 
Questionhow to get the count Pin
Anjani Poornima27-May-09 3:24
Anjani Poornima27-May-09 3:24 
AnswerRe: how to get the count Pin
padmanabhan N27-May-09 3:35
padmanabhan N27-May-09 3:35 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 3:46
Anjani Poornima27-May-09 3:46 
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 3:53
padmanabhan N27-May-09 3:53 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 4:04
Anjani Poornima27-May-09 4:04 
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 4:07
padmanabhan N27-May-09 4:07 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 5:18
Anjani Poornima27-May-09 5:18 
GeneralRe: how to get the count Pin
Baran M27-May-09 6:38
Baran M27-May-09 6:38 
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 19:00
padmanabhan N27-May-09 19:00 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 19:43
Anjani Poornima27-May-09 19:43 
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 19:58
padmanabhan N27-May-09 19:58 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 20:14
Anjani Poornima27-May-09 20:14 
script type = "text/javascript">
function checkAll(objRef)
{
var GridView = objRef.parentNode.parentNode.parentNode;
var inputList = GridView.getElementsByTagName("input");
for (var i=0;i<inputList.length;i++)
{
//Get the Cell To find out ColumnIndex
var row = inputList[i].parentNode.parentNode;
if(inputList[i].type == "checkbox" && objRef != inputList[i])
{
if (objRef.checked)
{
//If the header checkbox is checked
//check all checkboxes
//and highlight all rows
//row.style.backgroundColor = "aqua";
inputList[i].checked=true;
}
else
{
//If the header checkbox is checked
//uncheck all checkboxes
//and change rowcolor back to original
//if(row.rowIndex % 2 == 0)
//{
//Alternating Row Color
// row.style.backgroundColor = "#C2D69B";
// }
// else
//{
//row.style.backgroundColor = "white";
//}
inputList[i].checked=false;
}
}
}
}

/script
/head
body


<asp:gridview id="gridview1" runat="server" autogeneratecolumns="False" allowpaging="True" pagesize="2" borderstyle="Solid" width="1500px" datasourceid="SqlDataSource1" onselectedindexchanged="gridview1_SelectedIndexChanged">
<pagersettings position="Top">
< PagerStyle CssClass="mypager" HorizontalAlign="Right"/>

<columns>
<asp:templatefield>
<headertemplate>
<asp:checkbox id="checkAll" runat="server" onclick="checkAll(this);" text="SelectAll">

<itemtemplate>
<asp:checkbox id="CheckBox1" runat="server" onclick="Check_Click(this)" autopostback="true" oncheckedchanged="CheckBox1_CheckedChanged1">


<asp:boundfield datafield="Empid" headertext="Empid" sortexpression="Empid">
<asp:boundfield datafield="FirstName" headertext="FirstName" sortexpression="FirstName">
<asp:boundfield datafield="MiddleName" headertext="MiddleName" sortexpression="MiddleName">
<asp:boundfield datafield="LastName" headertext="LastName" sortexpression="LastName">
<asp:boundfield datafield="Email" headertext="Email" sortexpression="Email">


<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:dbdemoConnectionString3 %>"
="" selectcommand="SELECT [Empid], [FirstName], [MiddleName], [LastName], [Email] FROM [Dependents]">

No of Checkboxes selected <asp:label id="Label1" runat="server" text="Label" width="85px></asp:Label> <asp:Button ID=" btnsubmit"="" onclick="btnmail_Click">









here is my aspx code
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 20:19
padmanabhan N27-May-09 20:19 
GeneralRe: this is the sample which i did for you... this is working fine... just copy and paste and check Pin
padmanabhan N27-May-09 20:34
padmanabhan N27-May-09 20:34 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 20:48
Anjani Poornima27-May-09 20:48 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 21:45
Anjani Poornima27-May-09 21:45 
GeneralRe: how to get the count [modified] Pin
padmanabhan N27-May-09 22:04
padmanabhan N27-May-09 22:04 
GeneralRe: how to get the count Pin
Anjani Poornima27-May-09 22:54
Anjani Poornima27-May-09 22:54 
GeneralRe: how to get the count Pin
padmanabhan N27-May-09 22:59
padmanabhan N27-May-09 22:59 
Questionusing checkbox in gridview Pin
Anjani Poornima27-May-09 1:54
Anjani Poornima27-May-09 1:54 
AnswerRe: using checkbox in gridview [modified] Pin
padmanabhan N27-May-09 1:59
padmanabhan N27-May-09 1:59 
Questionwant to use rss Pin
jainiraj27-May-09 1:48
jainiraj27-May-09 1:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.