Click here to Skip to main content
15,749,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In repeater control i have bounded some company details from sqlserver 2005 .there is checkbox in the repeater control ,whatever items selected in the repeater should be converted into PDF ..on the button click...[how to do using for loop and
how to get the checked items seperately in a datatable...Please help me]
SASS_Shooter 1-May-12 10:42am    
What have you tried so far to enumerate through your repeater control?
Member 8405530 1-May-12 23:17pm    
DataTable dtData = new DataTable();
int a = dtData.Rows.Count;
// ViewState["Data"] = dtData;
dtData = (DataTable)ViewState["CurrentPos"];

DataTable dtResult = (DataTable)ViewState["Data"];

for (int i = 0; i < Rpt_Company.Items.Count; i++)

CheckBox ch = ((CheckBox)Rpt_Company.Items[i].FindControl("chkbox"));
if (ch.Checked == true)
string[] memberno = { "1002", "1003", "1006" };

// DataRow dr = dtData.NewRow();

//var memberno=from memberno in
//dr["Companyname"] = ((Label)Rpt_Company.Items[i].FindControl("Lbl_title1")).Text;

//CheckBox cbxIsActive = item.FindControl("chkbox") as CheckBox;
//HiddenField hdfID = item.FindControl("recordID") as HiddenField;



This only i have tried so far...I dont know how to call the member no for each row in the repeater control....loop condition..Please help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900