Select checked rows from Datagrid
-
Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.
VanithaVasu
-
Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.
VanithaVasu
tell me exactly what was u r scenario & looking for ?
GV Ramana
-
Hai, I am using a datagrid which contains CheckBox in each row. And During Runtime How can i get all the selected rows without using the Loop structure.
VanithaVasu
hai, refer below code... CheckBox chkbox = new CheckBox(); foreach(DataGridItem item in gridsearch.Items ) { chkbox=(CheckBox)item.FindControl("chkbox"); if(chkbox.Checked) { print some value - Response.Write(item.Cells[2].Text); } } regards, vidyasankar N
Think Big
-
hai, refer below code... CheckBox chkbox = new CheckBox(); foreach(DataGridItem item in gridsearch.Items ) { chkbox=(CheckBox)item.FindControl("chkbox"); if(chkbox.Checked) { print some value - Response.Write(item.Cells[2].Text); } } regards, vidyasankar N
Think Big
I Know this method too... I want to know the thing is Is there anyother method to find the selected rows without using the for loop. I ask this question because i was asked for this question in an interview. So If anybody know please let me know the solution.
VanithaVasu