Hello
My wingrid contains a summary for the count of column 1 in band 1. What I want is to hide the entire summary line when the column being counted contains a specific string value. My code shows continues to show the summary row when the specific string value is true. What am I missing?
Thanks
Clay Seifert
Dim WTs As UltraDataRowsCollection = dr.GetChildRows("WorkTickets") Dim wtsummary As SummarySettingsCollection
If WT("ProductName") <> "No Work Tickets have been assigned to this case." Then wtsummary = ug1.DisplayLayout.Bands(1).Summaries For Each SS As SummarySettings In wtsummary SS.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed ug1.DisplayLayout.Bands(1).Override.SummaryDisplayArea = SS.SummaryDisplayArea Next Else wtsummary = ug1.DisplayLayout.Bands(1).Summaries For Each SS As SummarySettings In wtsummary SS.SummaryDisplayArea = SummaryDisplayAreas.None ug1.DisplayLayout.Bands(1).Override.SummaryDisplayArea = SS.SummaryDisplayArea Next End If
Hi Clay,
In the link you posted here, I explained that hiding the Summary using the Hidden property on the SummarySettings will hide that summary everywhere, on every island.
I also explained that you could use a CreationFilter to hide the summary itself. But that case is different from yours. The developer in the other thread wants the summary row to still be there because he's using a CreationFilter already to show buttons in the summary row.
If you want to hide the summary without removing the summary row, then you could do that with a CreationFilter. But there is no way to reclaim the space where the summary would have been.
If you want to hide this summary on all rows in the band, then you can do that using the hidden property.
Hey Mike
I understand what you're saying but I am confussed. I came across this post indicating that you can hide the summary row --- (he has only 1 summary and it's also in band 1)
http://blogs.infragistics.com/forums/t/55215.aspx
Please advise how to do this.
Clay
It seems like what you want is to show this summary for some rows collections and not for other in the same band. There's no way to do that.
You can hide the text of the summary, but the summary itself is applied to the band, not to the row collection, so the grid will always create a space for that summary and there is no way around that.
The other post you linked to here is referring to a summary on the root band, so in that case, you can use the SummaryDisplayAreas to hide the summary, since it's only one summary in once place.But there is no way to control the display of the summary on a per-row-collection basis.
In fact, you could use a CreationFilter to hide the summary UIElements, but this will probably not satisfy your requirements, since this will still leave an empty space where that summary would have been.
Hi Mike
OK -- lets try this again. Sorry that I wasn't clear in my initial post.
My wingrid contains only one summary calculation for the count of column 1 in band 1. What I want is to hide the entire summary line when the column being counted contains a specific string value (See below). When it doesn't contain the value, I want it to contain the "Total Work Tickets:" display.
Here is the complete code for the loading of the band 1 in the grids ultrawindatasourse.
Dim WTs As UltraDataRowsCollection = dr.GetChildRows("WorkTickets")
If WorkTicketsForCase.Count > 0 Then For Each WorkTicket In WorkTicketsForCase Dim WT As UltraDataRow = WTs.Add WT("WorkTicket") = WorkTicket.WorkTicket WT("ProductName") = WorkTicket.ProductName WT("ProductNumber") = WorkTicket.ProductNumber WT("SerialNumber") = WorkTicket.SerialNumber Next
Dim wtsummary As SummarySettingsCollection = ug1.DisplayLayout.Bands(1).Summaries
For Each SS As SummarySettings In wtsummary SS.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed ug1.DisplayLayout.Bands(1).Override.SummaryDisplayArea = SS.SummaryDisplayArea Next
Else Dim WT As UltraDataRow = WTs.Add WT("WorkTicket") = "" WT("ProductName") = "No Work Tickets have been assigned to this case." WT("ProductNumber") = "" WT("SerialNumber") = ""
For Each SS As SummarySettings In wtsummary SS.SummaryDisplayArea = SummaryDisplayAreas.None ug1.DisplayLayout.Bands(1).Override.SummaryDisplayArea = SS.SummaryDisplayArea Next
End If
I used this approach based upon the recommendation in the following post. http://blogs.infragistics.com/forums/t/32441.aspx
I hope that this gives you what you need to provide assistance.
Hi,
I'm not sure what you are trying to do here. You're Your code is setting the SummaryDisplayArea on the the Override for the Band. So this will obvious affect the entire band and all summaries in the grid, not just one particular summary.
Is that what you want?
If so, then this seems like it should work okay, although it seems pretty confusing and I imagine there are much simpler ways to do it. The code here is incomplete, though, so it's hard to read. WT is not defined and I don't know what event this code is being called from.