Microsoft
Software
Hardware
Network
Question : ASP.Net/C# - GridView Checkbox template column how do I loop through checked rows?
Hello all. I have a gridview with a checkbox template column. How do I loop through and put together whatever rows the user checked I want to use the first column after the checkbox column data which is a bound column called code. I need to put together a list such as string where it would be like 'CR12, CR13, CR14' which code is the first column for the rows. I also need to do this when the user clicks on a checkbox I want to put this string together and call the load of another grid.
Code Snippet:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
Open in New Window
Select All
Answer : ASP.Net/C# - GridView Checkbox template column how do I loop through checked rows?
This might help you
for (int i = 0; i < FileList.Rows.Count; i++)
{
CheckBox cb = (CheckBox)Filelist.Rows[i]
.FindContr
ol("RowLev
elCheckBox
");
if (cb.Checked)
{
string codes += Filelist.Rows[i].Cells[0].
Text;
}
}
Random Solutions
MSJet
SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64B<wbr />IT_ERROR
What does it mean this access query
LDAP/ Active Directory Password Unlock Error..
Converting Access queries to T-SQL problems
Missing Microsoft Calendar Control 10.0
SBS 2003 NT Backup SqlServerWriter Error 0x800423f4
ALL TS Printer showing inactive TS Port
Insert field into memo field
Excel Macro to check all data in Colum A in sheet1 and delete all cells that contain that in all sheets