Flash Games

 FAQ   Search   Members   Groups   User Control Panel      Login 

It is currently Fri Dec 05, 2008 2:58 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Multiple Checkbox problem with C#
PostPosted: Wed Sep 28, 2005 9:52 am 
Offline

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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games

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:

User:
Pass:
Log me on automatically each visit: