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.
Thank you for the revision. It still misses two requirements which I had in my code.
I wanted to avoid indentation for child rows and it still shows header with filter icon. Click attached picture for required output. I had the code which hid the filter row + header and removed indentation but field definition was duplicated which I wanted to get rid.
Matt, this attachment is old version. Please retry the attachment.
HI,
Here the attachment.
Sincerely, Matt Developer Support Engineer
Thank you for this. This attachment has the changes for partial soltion. Looking forward to receive the other half soon.
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.
Hi Matt,
I have managed to get this done. Can you please review attached solution and let me know any performance implications.