Hi All,
I've discovered my first attempt was incorrect. I now have grouping with columns frozen on the right thanks to the demo that came with the controls. However, removing the +/- and expanding all the rows has been challenging. So how do I do that?
I've tried various permetations of: public ApprovePaymentsForVendorInvoicesUIPresenter() { _approvePaymentsForVendorInvoicesUI = new ApprovePaymentsForVendorInvoicesUI(); _approvePaymentsForVendorInvoicesUI.GridApprovals.InitializeLayout += GridApprovals_InitializeLayout; _approvePaymentsForVendorInvoicesUI.GridApprovals.InitializeRow += GridApprovals_InitializeRow; _approvePaymentsForVendorInvoicesUI.GridApprovals.SetDataBinding(GetDataForUI(), "", true, true); _approvePaymentsForVendorInvoicesUI.GridApprovals.Rows.ExpandAll(true); _approvePaymentsForVendorInvoicesUI.GridApprovals.Refresh();
foreach (UltraGridRow row in _approvePaymentsForVendorInvoicesUI.GridApprovals.Rows) { row.Expanded = true; row.ExpandAncestors(); }
}
private void GridApprovals_InitializeRow(object sender, InitializeRowEventArgs e) { e.Row.Expanded = true; }
private void GridApprovals_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.ExpansionIndicator = Infragistics.Win.UltraWinGrid.ShowExpansionIndicator.Never; }
Hello Glen,
You were correct. ExpandAll will work only when the Grid is populated with data and when Form is already rendered. Please let me know if you need any assistance for implementing this.
For the items 1&2: To remove the items count from GroupByRow header you can either set the GroupByDescriptionMask property to apply to all group-by rows, or you can handle the InitializeGroupByRow event to have finer control on a row-by-row basis. For more information, please refer to the following post:
https://www.infragistics.com/community/forums/p/16548/60335.aspx#60335
Item3: In the InitializeRow event you can write custom logic to check if a row is an empty row and if the previous row is summary row. Then based on the result of this condition you can remove the active row.
Item4&5: Summary row footer caption can be modified by using the SummaryRowFooterCaption property for example you can do something like this: // Set the caption that shows up on the header of the summary footer. band.SummaryFooterCaption = "Summary of Unit Price";
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Hi Sahaja,
Thanks, for responding.
I've tried this in various places with no results.
_grid.DisplayLayout.Override.ExpansionIndicator = Infragistics.Win.UltraWinGrid.ShowExpansionIndicator.Never; The "_grid.Rows.ExpandAll(true);" only seems to work once the grid has been visualized (displayed), so after the form is shown can I use it.
private void _approvePaymentsForVendorInvoicesUI_Shown(object sender, EventArgs e) { _grid.Rows.ExpandAll(true); }
Now for the rest.
Items 1 & 2 are the same, just at different levels of grouping. They don't want to display the count, just the name of the 1st grp (Company) and the name of the 2nd grp (Vendor); so i was wondering then how do I create a custom group header?
Please let me know if you still need an example.
Thank you again.
Glenn
Hello Glenn,
It is possible to hide the ExpansionIndicator for the UltraGrid parent rows by writing something like this:
this.ultraGrid1.DisplayLayout.Override.ExpansionIndicator = ShowExpansionIndicator.Never;
You would do this outside the InitializeRow event unless you want to show/hide the ExpansionIndicator for specific rows. Also after removing the ExpansionIndicator from GridLayout you can expand all Grid rows by simply setting the below property:
this.ultraGrid1.Rows.ExpandAll(true);
For the latest questions you posted on the forum, Could you please elaborate on the below details:
1. Company Or Property: XXXX (# items) - need it w/o the (# items) -Are you talking about the child rows and do you want to hide them? 2. Vendor: XXX (# items) - need it w/o the (# items) -Isn’t this similar to your first question or is there any detail that I need to know. 3&4: I will research these issues and will send you a progress update by end of day Thursday. 5. Company or Property summary row need to add the Company/Property name here -I believe this is similar to your 4th question. 6. I answered this above. Please go over it and let me know if you have any questions.
Well I'm getting father but I think I have reached the end. I need some help on:
1) Company Or Property: XXXX (# items) - need it w/o the (# items)
2) Venor: XXX (# items) - need it w/o the (# items)
3) Remove the blank footer above the totals
4) Add Vendor on the SummaryRow - I saw something about DrawFilters but unsure how to drill down thru each type I want to change (Top Level Grp, next level)
5)Company Or Property summary row need to add the Company/Property name here
6) need the +/-'s removed
I cant have them staggering down. I need it like the following:
Summary Row Example
if vendor is Alpha
Alpha #####.## #####.##
not
Alpha
#####.## #####.##
same goes for company.
Glenn Andrews said: Screenshot.
Screenshot.
Please advise
Thanks Glenn