Oops. I apologize for the mistake.
The code sample I gave you comes from the InitializeRecord event - I confused the two.
Do you think you could use that event? It looks like I haven't used the FieldLayoutInitialized event yet. It seems like there's room for achieving similar results with both, no?
You can get to the DataContext of the record being presented with this:
e.FieldLayout.DataPresenter.DataContext
Of course, you either know what the object is, or you can test/cast it and then work with it. I guess it depends on what you're trying to do. If you were just trying to get to the underlying DataItem, you can accomplish that through the DC, right?
Hi, thanks for the reply
Not sure if I'm missing something, but in the FieldLayoutInitialized event of the xamDatagrid there are only the following properties off of the 'e' event args object:
and none of the above expose a Record property.
Drilling down to an individual field of the layout (FieldLayout.Fields[0]), there is still no Record property.
Sure is.
GroupByRecord gbr = e.Record as GroupByRecord;
if (rec != null) ...