Hi
I have a complex type person with type property (1 = firm, 2 = private) and sub properties firm and private. In the first 2 columns of m y grid i want to bind this person first name, last name if it's of private type otherwise firm name , firm sub name. How should i do this?
I just found out that there is an InitializeRecord event where i can manipulate records at runtime. Here's the signature:
MethodName(object sender, InitializeRecordEventArgs e)
I'm not sure though how to get the active cell index. Could you help?
It is possible, but you would have to retemplate the CellValuePresenter or the embedded Editor and provide this functionality in the new Control/DataTemplate. The DataContext of the CVP is the DataRecord itself, so you have direct access of all of he cells and if you retemplate the editor, you would have to get its Host's (the ValueEditor exposes Host property) DataContext, which is the CVP.
Is it possible to bind multiple properties in an unbound field?
I am not sure if this is possible. The UnboundField will create a binding to the target property for all of its cells and I am not sure if you can change this. Perhaps you could extract this into a base class and bind to its property.
That's not what i meant.
Currently i have an unbound field setup like this:
<igDP:UnboundField Name="FirstName" Label="First Name / Firm Name" BindingPath="Data.FirstName"/>
Somehow i need some kind of trigger that when type is 2 the unbound field should change:
<igDP:UnboundField Name="FirmName" Label="First Name / Firm Name" BindingPath="Data.FirmName"/>