Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
DataTable control Binding issue
posted

Hi

I have problem with UltraTextEditor (and other Infra UI components building)

1. Component bound to same DataTable column (eg Name on below example) do not update
    Expected behavior - leaving tbName and focusing (eg tbCity) should result displaying same value in tbName2

2. Change made in components are not reflected in DataTable bound to eg dataGridView
    Expected behavior - leaving (moving focus) from currently edited control should update dataTable / grid

Cant believe this is Infra bug, I must be doing something wrong - appreciate your help here !

Below is sample app code and screen how it works

           DataTable dt = new DataTable();

           dt.Columns.Add("Name");
            dt.Columns.Add("City");


            tbName.DataBindings.Add ( "Value", dt, "Name",true, DataSourceUpdateMode.OnPropertyChanged);
            tbName2.DataBindings.Add( "Value", dt, "Name",true, DataSourceUpdateMode.OnPropertyChanged);
            tbCity.DataBindings.Add( "Value", dt, "City",true, DataSourceUpdateMode.OnPropertyChanged);


            // New row
            dt.Rows.Add ( dt.NewRow() );

            dataGridView1.DataSource = dt;

Parents Reply Children