Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 686309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:00:40+00:00 2026-05-14T02:00:40+00:00

I have a checkbox who’s checked value is bound to a binding source which

  • 0

I have a checkbox who’s checked value is bound to a binding source which is bound to a boolean data table column. When I click my save button to push my changes in my data table to my sql server the value in the data table is never changed.

Designer code.

this.cbxKeepWebInfinityChanges = new System.Windows.Forms.CheckBox();
this.preProductionBindingSource = new System.Windows.Forms.BindingSource();
// 
// cbxKeepWebInfinityChanges
// 
this.cbxKeepWebInfinityChanges.AutoSize = true;
this.cbxKeepWebInfinityChanges.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.preProductionBindingSource, "WEBINFINTY_CHANGES", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.cbxKeepWebInfinityChanges.Location = new System.Drawing.Point(6, 98);
this.cbxKeepWebInfinityChanges.Name = "cbxKeepWebInfinityChanges";
this.cbxKeepWebInfinityChanges.Size = new System.Drawing.Size(152, 17);
this.cbxKeepWebInfinityChanges.TabIndex = 30;
this.cbxKeepWebInfinityChanges.Text = "Keep WebInfinity Changes";
this.cbxKeepWebInfinityChanges.UseVisualStyleBackColor = true;
this.cbxKeepWebInfinityChanges.CheckedChanged += new System.EventHandler(this.CauseApplyChangesActivation);
// 
// preProductionBindingSource
// 
this.preProductionBindingSource.AllowNew = false;
this.preProductionBindingSource.DataMember = "PreProduction";
this.preProductionBindingSource.DataSource = this.salesLogix;

Save Code

//the comments are the debugger values before the call in going from checked when loaded to unchecked when saved.
private void btnApplyChanges_Click(object sender, EventArgs e)
{
    (...) // non related saving logic for other controls
    preProductionBindingSource.EndEdit(); // checked = false, databinding = true, datatable = true
    preProductionTableAdapter.Update(salesLogix.PreProduction); // checked = false, databinding = true, datatable = true
}

The same things happens when going from unchecked to checked. Other items I have bound to the same data-binding source (I have two combo boxes) are updating correctly.

EDIT —
Adding cbxKeepWebInfinityChanges.DataBindings["Checked"].WriteValue(); before the preProductionBindingSource.EndEdit(); did not change anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:00:41+00:00Added an answer on May 14, 2026 at 2:00 am

    I was using Dathan’s suggestion from another one of my questions, I was trying to bind a text Yes/No field in the database to this check box. I changed it back to a normal query and used Binding.Parse and Binding.Format and it solved my issue.

    Here is some sample code.

    Public Form1()
    {
        InitializeComponent();
        cbxKeepWebInfinityChanges.DataBindings["Checked"].Parse += new ConvertEventHandler(cbxKeepWebInfinityChanges_Parse);
        cbxKeepWebInfinityChanges.DataBindings["Checked"].Format += new ConvertEventHandler(cbxKeepWebInfinityChanges_Format);
    }
    
    void cbxKeepWebInfinityChanges_Parse(object sender, ConvertEventArgs e)
    {
        if ((bool)e.Value == true)
            e.Value = "Yes";
        else
            e.Value = "No";
    }
    void cbxKeepWebInfinityChanges_Format(object sender, ConvertEventArgs e)
    {
        if ((string)e.Value == "Yes")
            e.Value = true;
        else
            e.Value = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a checkbox in GridViewColumn which i use for show/change database value. The
T have used checkbox column in gridview. On click of a linkbutton, it should
I need to get the value of the first checkbox which is checked and
I have a construction that checks if a checkbox is checked (who can use
I have used checkbox column in gridview. I want to check status of that
So - I have a checkbox <asp:CheckBox ID=chkOrder runat=server Visible='<%#IsCheckBoxVisible() %>' Checked=false OnCheckedChanged=chkOrder_CheckedChanged AutoPostBack=true
I want to have a checkbox for terms and conditions, label of which should
I want my website to have a checkbox that users can click so that
I have a gridview that I have added a checkbox column using a templatefield
I have a data grid that has a checkbox item renderer in a cloumn

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.