This is a discussion on "Multiple Checkbox problem with C#" within the ASP.NET Forum section. This forum, and the thread "Multiple Checkbox problem with C# are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Multiple Checkbox problem with C#
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Multiple Checkbox problem with C#
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 + " "); } e.g. Second Logic ----------------- foreach (DataGridItem objItem in MyDataGrid.Items) { CheckBox cb = (CheckBox)objItem.Cells[5].FindControl("chkSelectAll"); Response.Write (cb.Checked + " "); if (cb.Checked) { command....... } } Pl guide me to get out of this. Thanking You, Jeenec |
|
|
![]() |
| Tags |
| multiple, checkbox, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem sending Multiple Attachments w/Email | wacara | Classic ASP | 0 | Aug 9th, 2007 19:50 |
| Validatwe multiple checkbox with array [] | Mochachino | JavaScript Forum | 0 | May 5th, 2007 04:44 |
| Problem accessing multiple databases, not at the same time.. | poisedforflight | PHP Forum | 2 | Nov 21st, 2005 13:25 |
| Validation problem with multiple submit buttons | celia05es | JavaScript Forum | 2 | Sep 29th, 2005 08:19 |
| CheckBox problem with ASP.Net DataGrid | frmsasp | ASP.NET Forum | 2 | Sep 28th, 2005 09:04 |