listview check box change event
-
Hi i am using list view control in my form, In that itemtemplate i used checkbox..., Now that check box check change event i have to capture..., I searched in google but i didnt get ,help me regarding that
Thanks & Regards, NeW OnE, please don't forget to vote on the post
-
Hi i am using list view control in my form, In that itemtemplate i used checkbox..., Now that check box check change event i have to capture..., I searched in google but i didnt get ,help me regarding that
Thanks & Regards, NeW OnE, please don't forget to vote on the post
-
what i would do is: add a button after the listview, and in the button_click event, go through the list view, row for row, and then use the : CheckBox box = (CheckBox)Row.FindControl(CheckBoxID) if (box.checked) { } else { }
ya thats ok,. i cant able to get the selected checkbox row cell value..., This is my code: string getchoice11 = null; string chval = null; int loop11 = 0; CheckBox chkHeader = sender as CheckBox; for (int i = 0; i < lvEmployee.Items.Count; i++) { CheckBox chk = lvEmployee.Items[i].FindControl("ICheck") as CheckBox; if (chk.Checked == true) { getchoice11 += "'" + lvEmployee.Items[1].ToString().Trim() + "',"; } } Thanks & Regards, NeW OnE, please don't forget to vote on the post
-
ya thats ok,. i cant able to get the selected checkbox row cell value..., This is my code: string getchoice11 = null; string chval = null; int loop11 = 0; CheckBox chkHeader = sender as CheckBox; for (int i = 0; i < lvEmployee.Items.Count; i++) { CheckBox chk = lvEmployee.Items[i].FindControl("ICheck") as CheckBox; if (chk.Checked == true) { getchoice11 += "'" + lvEmployee.Items[1].ToString().Trim() + "',"; } } Thanks & Regards, NeW OnE, please don't forget to vote on the post
-
Why not use the following: foreach( ListViewItem lvi in lvEmployee.Items) { CheckBox chk = (CheckBox)lvi.FindControl("ICheck"); if (chk.Checked) { getchoice11 += lvi[1].ToString().Trim() + ","; } }
getting error as this place: getchoice11 += "'"+ lvi[2].ToString().Trim() + ","; Cannot apply indexing with [] to an expression of type 'System.Web.UI.WebControls.ListViewItem'
Thanks & Regards, NeW OnE, please don't forget to vote on the post