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 / gridCant 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;
Hello Maciej,
Regarding the UltraGrid, how are you leaving edit mode and when does the cell not update? Are you clicking to another control?
When an UltraWinGrid cell is in edit mode, the changes are not written to the underlying data until the cell exits edit mode. You can force the grid to exit edit mode if you are calling UpdateData and there is a chance the grid still has the focus. You can do this using PerformAction.
UltraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExitEditMode) UltraGrid1.UpdateData()
Im not using Infragistics grid here - Im using Combo, textboxes, radios etc
As you can see in my code Im using DataGridView