Hi I am able to get the heirarchical data display.
but, i want to customise the child table fields.
normally in Fieldlayoutinitialized event, i get all the list of fields.
but, here, i only get the parent table fields..but, not the child table fields.
how do i get the list of the fields from child table?
Event at the RecordInitialized event the
DataRecord dr = e.Record as DataRecord;
dr is refering to parent record.
interestingly dr.childrecords also refering to parent record
more interestingly dr.parentrecord is also refering to parent record.
looks like no way to track childrecord fieldlayout
note: honestly...i didnot get what you mean with the last statement of your reply..
I think you took me wrong..
I have to change the fieldlayouts for the child table fileds....
like changing the label, color,width etc of the child table fields ...depending on the configuration.
usually, i read the configuration from xml and set the fieldlayouts in the Fieldlayoutinitialized event.
like..
e.fieldlayouts.fields["field1"].label="newconfiglabel";
etc
the same i am trying to do with heirarchichal data, but, i cannot trace the child fieldlayouts.
where/how can i get the child table fieldlayouts...?
Can you sit on the InitializeRecord event and watch for the DataRecord?
DataRecord rec = e.Record as DataRecord;
You'll get various record types, so cast it to DataRecord and when you get a hit, deal with it. Otherwise, I think you'd need to try to drill down into the child record collections from the FieldLayoutInitialized event and there's a trick with that involving threading because of a bug. I don't know if the hotfix resolved that issue. It's been discussed on this forum because I needed help getting it to work.
this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new GroupByHandler(this.FormatGroupByRecord), gbr);