Hi all
My records contain unbound cells which display data based on on a presenter style and a converter. For these cells, the grid is not aware if the underlying data changes - which results in a faulty representation of my data. What I'm looking for is a way to refresh a record according to the functionality provided by WinGrid. I'm pretty sure there must be something, but I couldn't figure out where...
Thanks for your advice
Philipp
ps: I think this problem is one of the shortcomings of the BindingPath string of an unbound field. It sure would be nice if we just could use a real binding instead:<igDP:UnboundField Value="{Binding ...}" />
I used to have below to force the converter to be called, but this hack does not work anymore after I upgraded to 2010.2 version. Any help?
// Force Xam Grid to redraw the record so that background color converter can be called.dataRecord.Visibility = Visibility.Collapsed;dataRecord.Visibility = Visibility.Visible;
Was a solution to this ever found? I have very similar issues where I cannot use Databinding with change announcements.
Thanks,
Hi,
Well no reply so far. Just to elaborate ny query, I have used CellValuePresenterStyle property for attaching the comboBox in the field. Normally EditoryStyle property is used for definig the style. I couldn't get EditorStyle property working in my case, may be because i am overriding the base class properties. So there may be a conflict between the base and derived class property and Xaml gets comewhat confused.
The ItemSource for my second comboBox is based on the selected item in the Player comboBox whic is generated by a converter and it is associated with the ItemSource property of the PlaybackStream ComboBox in Xaml.
Whenever there is a selection change in Player ComboBox I need to re-set the ItemSource for all the PlaybackStream comboBoxes in all the records.
Anyhow for a short term solution I got around the problem by setting the Datasource for the XamDataGrid = null and then re-associate it to my collection. This works fine as desired. Ofcourse there need to be an explicit refresh call so that all records refresh themselves as they do initially in the first XamDataGrid Load cycle.
Thanks for any help.
Nasir
Hi there,
Think this is the right place for my query as well.
I have got 2 styles defined in datagrid and they both have the comboBoxes displayed in those style. My first comboBox(Players) when is changed I need to set the itemsSource of my second comboBox(PlaybackStream). I am using a converter to retreive the information from a dictionary and construct the itemsSource on the fly for my PlaybackStream comboBox based on Selected Player.
Initially when the Data is loaded all well.
The problem arises when I change the Player. That changed Player does has the correct itemsSource for the PlaybackStream ComboBox in that Record. But I need to refresh all the Players and PlaybackStreams so that I can show the chnage is others due to the current Player being chnaged.
SO I need to refresh all my records so that my converter can initiate and generate the itemsSource for all the PlaybackStreams in the Grid.
I have used the CoerceValue property but didn't work.May be I am missin something...
Any feedback is appreciated.
Hello Joe,
Uh oh, the problem is related to the issue in the other thread
-> This is an artificial sample. I want to explicitely refresh my record *because* I cannot bind to a property that announces it's change: If it did, I wouldn't have to refresh the record manually. I can think of tons of samples where this absolutely might be the case - is there no workaround for this?
I'm still fishing for that DataRecord.Refresh method, but I'll accept any hack, now matter how dirty it might be
Cheers,