Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please solve this problem.
there are several check boxes in a list view,
now if a check box is selected and saved it is saved properly.
but if checked and then unchecked and then saved, then also the checked value is stored in the data base. this should not have happened since the check box was unchecked before saving.


My checked code............

XML
List<string> checkedEventsID = new List<string>();

       List<string> checkedEventsName = new List<string>();




C#
private void check1_Checked(object sender, RoutedEventArgs e)
      {


         string ID = Convert.ToString(((System.Windows.Controls.CheckBox)sender).Tag);
          string Name = string.Empty;
          Name = Convert.ToString(((System.Windows.Controls.CheckBox)sender).Content);
          checkedEventsID.Add(ID);
          checkedEventsName.Add(Name);
      }


C#
private void check1_UnChecked(object sender, RoutedEventArgs e)
      {

}

check1 in in list view.
Posted
Updated 17-Oct-12 22:04pm
v5
Comments
Jim Jos 18-Oct-12 3:03am    
When its unchecked are you removing the ID and Name from the collection?
Dibin Babu 18-Oct-12 3:22am    
No.

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