I have two columns in a Grid. The 1st column of type image and a second column of text that represents the image of the first column. I wish when I group the first column of the grouping is done by hidden column. There is how to do?
miguelsneto said:It turns out that the image column is intentionally left without caption. I need her to have a caption when I group and when ungroup the caption to stay empty again.
You could handle the AfterSortChanged event and see if the column is grouped by checking the IsGroupByColumn property on the column and set the Caption accordingly.
miguelsneto said:In the second I need the GroupByRowDescriptionMask receive the value of the column of text that is hidden and I do not know how.
I'm not sure exactly what you mean. There are replacement codes you can use to create the mask and they are all documented in the help. If you need some information in the description that there is no replacement code for, then you will have to take the second approach and use the InitializeGroupByRow event to set the Description to the text you want.
understand you. It turns out that the image column is intentionally left without caption. I need her to have a caption when I group and when ungroup the caption to stay empty again. In the second I need the GroupByRowDescriptionMask receive the value of the column of text that is hidden and I do not know how.
The top item is the group by button. It displays the caption of the key of the column. You probably just have to assign a key to the image column when you add it to the grid, assuming it's an unbound column. Or you might have to set the Column.Header.Caption.
For the GroupByRow, you can use the GroupByRowDescriptionMask property or you could handle the InitializeGroupByRow event and set the Description property of the row.
thank you Mike. Works the way I expected.
is there any way to change the items marked below?
You have to attach an instance of this class to the image column.
Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout Dim layout As UltraGridLayout = e.Layout Dim band As UltraGridBand = layout.Bands(0) band.Columns("Image Column").SortComparer = New MyComparer() End Sub