On my DataGrid I have a ComboBox column. I handle its SelectionChanged event to update the value of two text columns so the user can see the new values before the row is commited. This worked fine in the January release, but now with the March 21st release
the columns aren't being updated when UpdateTarget() is called. Is there anything that I've overlooked?
void cboType_SelectionChanged(object sender,
DataGridRow row = (DataGridRow)dataGrid.ItemContainerGenerator.ContainerFromIndex(dataGrid.SelectedIndex);
DataGridColumn columnBasedOn = dataGrid.Columns.Where(c => c.Header.ToString()
== "Based On").First();
DataGridColumn columnAmount = dataGrid.Columns.Where(c => c.Header.ToString()
Mar 26, 2009 at 1:11 AM
How come you are unable to see the combobox update even without doing that? What does your ComboBox column declaration look like?
Sorry, I think I understand my problem better now.
The combobox is bound to a property of the data record which determines the value of the two other columns. In the January release, when the selected item in the combobox changes, the property it's binding to is immediately updated. In the March release the
propery is updated after the combobox loses focus. The UpdateSourceTrigger for the combobox column's binding is set to PropertyChanged, so I'm confused. I tested this out by uninstalling the March release and installing January's and, without changing any
code, the behaviour changed.
Thanks for bearing with me.
Path=FeeTypeID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Header="Based On" IsReadOnly="True"
May 19, 2010 at 11:40 PM
Edited May 19, 2010 at 11:41 PM
I'm seeing the same problem. I do not have any event handler for SelectionChanged, but the SelectedValueBinding is not immediately setting the binding source property. This is even with UpdateSourceTrigger.
The update happens when combo box loses focus, which does not help my scenario of dynamic content changes.
Note: I'm using the latest toolkit release ( Feb 2010).