Hi All,
I am making use of UltraWinGrid in my application. I have added a column under the sortedcolumnscollection by default. So, by default my grid would be grouped by a column say "Project Number". I have added summary for many columns in my grid. I have given the summary display area as "InGroupByRows" and hence I would get the summaries in my group-by rows. Now, I would like to get the summary of all the group-by rows in the bottom. You can understand what am looking for below
I want the consolidated summary at the bottom apart from the summary in each and every group-by row. How could I achieve that? Any help would be of great use.
Regards,
Raghuraman.V
SummaryDisplayAreas is a flagged enumeration, so you can specify multiple values by ORing them together.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.SummaryDisplayArea = SummaryDisplayAreas.InGroupByRows | SummaryDisplayAreas.RootRowsFootersOnly | SummaryDisplayAreas.Bottom; }
Is this possible to have the alignment of multiple summaries in a way that, one summary is docked in Leftside of the grid and another summary is docked in bottom of the grid.I am using infragistics v9.2. It would be great if some one is helping me to achieve this. Thanks in advance.The UI is something like below.
Hi,
So you wanted a summary just to put some arbitrary UIElement on the left side of the grid? There's no way to do that with a summary.
I'm still not totally clear on what you are trying to do. Why would you have a dropdown with only a single row?
Anyway... there are a number of approaches you could take here.
You could make your own combo using the DropDownEditorButton and put an actual TableLayoutPanel in it with a grid on the right and whatever you want on the left.
Or you could add an unbound column to the UltraCombo and use the unbound column to position a button using a CreationFilter.
Thanks for the help.I am successfullfy able to achieve my desired UI by developing a custom combo using DropDownEditorButton .But the point is I have already developed a application by using Ultracombo. so I am finding is there any way to alter my Ultracombo to get the desired UI. I have followed your second advice and added a unbound column to Ultracombo. and then in Creation filter I have placed my desired UIelement in that column. Here i need help to resolve the following scenario.1. Is there any way to avoid the row selcetion (highlighting) in unbound column alone when any row is selcted in ultracombo or keydown key is pressed.2. I was able to attch the Button UI in column header area but not able to extend it to row collection area in that column. Is there any way to create a row span in that column. 3. Is there any way to get the entire column area (Header & Body) in creationfilter and add a button UI there. if so can you please share the source code.Sorry if I am not clear in any of the above points.Here my only goal is avoiding the row selection (Highlighting) in the Unbound column I have added. Thanks in advance.
Hi Raja,
From your questions, it sounds like you want the entire unbound column to be one big button that covers the cells and the header. Is that right? Or do you want a button on each row? If I can understand exactly what you want to do, I can try to whip up a sample for you.
Thanks a lot Mike.Yes, my need is one big button that covers the cells and the header.Please share the sample code to achieve this behaviour.
I tried this out using a CreationFilter, and I found it very difficult. I think it will be extremely difficult to get this to work reliably where the button covers both the cells and the column header. But if you are willing to have the button just cover the cells and not the header, I was able to get it working by using cell merging.
By merging the unbound column, it simplifies things quite a bit, because the entire column of cells becomes one big cell, anyway.
I have attached a sample here demonstrating how I did it.
Wow... this was a tough one to track down. It looks like the ButtonClick isn't firing because the button is contained within the MergedCellUIElement and this element is intentionally passing mouse message on to the cells underneath it.
It took me a while, but I found a way around it. Instead of putting the ButtonUIElement inside the MergedCellUIElement, I replaced the element, instead.So change around BeforeCreateChildElements like so:
bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { // Watch for the merged cell of the unbound button column. MergedCellUIElement mergedCellUIElement = parent as MergedCellUIElement; if (null != mergedCellUIElement && mergedCellUIElement.Column.Key == "ButtonColumn") { UIElement grandParent = parent.Parent; // Get the ButtonUIElement, if there is one, or if not, create a new one. MyButtonUIElement buttonUIElement = grandParent.GetDescendant(typeof(MyButtonUIElement)) as MyButtonUIElement; if (null == buttonUIElement) { buttonUIElement = new MyButtonUIElement(parent); grandParent.ChildElements.Add(buttonUIElement); } // Set the rect of the button element to the merhed cell rect. buttonUIElement.Rect = parent.Rect; grandParent.ChildElements.Remove(mergedCellUIElement); return true; } // Do nothing return false; }
Mike,
Thanks a lot for the sample code. This sample gives my desired UI.
From functionality wise I need one more help.
I need to subscribe the click event of the bigger button we have placed in unbound column.I have subscribed for ElementClick event. But it doesnt work.
Meanwhile I have tried a custom class for ButtonUI and created a overridden method for ButtonClick and OnMouseEnter. I am getting hit in OnMouseEnter. but not getting hit in ButtonClick method.
Please help me to get the click event of ButtonUI which is placed in ultracombo column.
Thanks in advance.