Hi
I have a self referencing hierarchical data structure with about 70 fields. These fields are of various data types. I have defined width, visibility, labels, various cellvaluepresenter styles and Editor styles to show different look and feel and formatting for these fields. Since All levels needs to be show/exhibit same properties (width, visibility, labels etc). Is there a way I can avoid duplication of XAML which is already 250 lines for one level?
Thanks.
HI Abbas,
You dont need to create a separate layout for each leve, if the levels are the same.
I am attaching sample application that has multiple levels, but only one layout.
Sincerely, Matt
Developer Support Engineer
Thanks Matt but it does not answer my question in full. As I said before, I have 70+ fields of various data types. Some of them have defined width, visibility, labels and customized cellvaluepresenter and editor styles. These all needs to be replicated across all levels. I cant see this in your attached sample.
Hi Matt,
For some reason attachment is same as your previous post. Can you please double check and attach the new version again?
HI,
Here is the new sample. I define a single layout and customize each field.
Sincerely,
Matt Developer Support Engineer
Hi Matt
Its step in right direction. However, I have to hide header and filtering rows for child records. So I have updated the sample and you can see that fileds are commented out which are repeated in parent and child level. It might seem trivial to repeat for 4 - 5 fields but I have 70+ fields. Is there a way I can avoid rewriting them in XAML?
Matt
For some reason Header tooltips are not working for this sample. I addedd following style in resources:
<Style TargetType="{x:Type igDP:LabelPresenter}" BasedOn="{StaticResource {x:Type igDP:LabelPresenter}}"> <EventSetter Event="ToolTipOpening" Handler="XamGridHeaderToolTip_Opening"/> </Style>
and following handler:
private void XamGridHeaderToolTip_Opening(object sender, ToolTipEventArgs e) { if (sender != null && sender is LabelPresenter) { var lp = (LabelPresenter)sender; lp.ToolTip = "Test"; } }
But it is not showing the tooltip.
Nice solution, I don't see any performance issues.
Sincerely, Matt Developer Support Engineer
I have managed to get this done. Can you please review attached solution and let me know any performance implications.
Thank you for this. This attachment has the changes for partial soltion. Looking forward to receive the other half soon.
Here the attachment.