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 6163179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:46:53+00:00 2026-05-23T21:46:53+00:00

I need twoway binding configClass.RaMsize to numericUpDown. BindField(this.upDownRamSize, Value, configClass, RaMsize);//all right this.upDownRamSize.Value =

  • 0

I need twoway binding configClass.RaMsize to numericUpDown.

BindField(this.upDownRamSize, "Value", configClass, "RaMsize");//all right

this.upDownRamSize.Value = 1213;// configClass.RaMsize - not change - it's bad!

Method:

public static void BindField(Control control, string propertyName,
               object dataSource, string dataMember)
        {
            Binding bd;

            for (int index = control.DataBindings.Count - 1; (index == 0); index--)
            {
                bd = control.DataBindings[index];
                if (bd.PropertyName == propertyName)
                    control.DataBindings.Remove(bd);
            }
            control.DataBindings.Add(propertyName, dataSource, dataMember);
        }
  • 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-23T21:46:54+00:00Added an answer on May 23, 2026 at 9:46 pm

    I assumed that ConfigClass looks like:

    public class ConfigClass
    {
        public decimal RaMsize { get; set; }
    }
    

    So change
    control.DataBindings.Add(propertyName, dataSource, dataMember);

    to:

    control.DataBindings.Add(propertyName, dataSource, dataMember, false, DataSourceUpdateMode.OnPropertyChanged);
    

    Test:

    BindField(this.upDownRamSize, "Value", configClass, "RaMsize");
    
    this.upDownRamSize.Value = 1213;// configClass.RaMsize will also have 1213
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to have two way communication between threads in Tcl and all I
In my Silverlight prjoect I am creating a simple two-way binding in code: This
Ok, so I have been trying to iron out this data binding for a
I am no way experienced in this type of thing so I am not
Controls like the TextBox use TwoWay Binding by default <TextBox Text={Binding Text1} /> However
I don't really see the need for element to element binding in Silverlight 3
Is a separate WPF value converter object instantiated for each binding that a particular
I have the need to set a binding in code. I can't seem to
I need bind some ComboBoxes to one ObservableCollection. I have this ListView . <ListView
All, I'm pounding my head against the wall here. What I need is simple,

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.