|
It is currently Thu Jan 08, 2009 4:09 am
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 1 post ] |
|
| Author |
Message |
|
frmsasp
|
Post subject: Multiple Checkbox problem with C# Posted: Wed Sep 28, 2005 9:52 am |
|
Joined: Sat Sep 03, 2005 8:02 am Posts: 8
|
|
Dear friend,
I am new in C#. I had created DataGrid which will collect data from table. Here I had provide delete functionality like hotmail, yahoo checkbox. If user select checkbox from top header checkbox then all checkboxes are automatically selected of that particular column.
Selection/deselection will work fine. But at C# side I got "False" value only though I had selected checkbox.
e.g. First Logic
----------------
for (int i=0; i<MyDataGrid.Items.Count; i++)
{
String isChecked = ((CheckBox) MyDataGrid.Items[i].FindControl("chkSelectAll")).Checked.ToString();
Response.Write ("Delete === " + isChecked + "<BR>");
}
e.g. Second Logic
-----------------
foreach (DataGridItem objItem in MyDataGrid.Items)
{
CheckBox cb = (CheckBox)objItem.Cells[5].FindControl("chkSelectAll");
Response.Write (cb.Checked + "<br>");
if (cb.Checked)
{
command.......
}
}
Pl guide me to get out of this.
Thanking You,
Jeenec
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 1 post ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|