Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
Summary row
posted

Is there a way to force the summary row to display the first column left justified and the rest of the columns right justified. At present i have set the first col of the grid to be left justified and the summary row to be right justified. these two settings do not co exist happily as all data in the summary row is right justified.

 

Style.TextHAlignAsString = "Right"

grid.DisplayLayout.Override.SummaryFooterCaptionAppearance = Style

grid.DisplayLayout.Bands(0).Columns(0).Layout.Appearance.TextHAlign=Infragistics.Win.HAlign.Left

Parents
No Data
Reply
  • 320
    Verified Answer
    posted

    Thread closed.

    The following code checks the column header for specific text in this case "column1" and sets the alignment acordinly..

    SetSummariesAlignment(grid.DisplayLayout.Bands(0).Summaries)

    Protected Sub SetSummariesAlignment(ByVal summaries As SummarySettingsCollection)
            For Each summary As SummarySettings In summaries
                If IsDataColumn(summary.SourceColumn.Key) = False Then
                    summary.Appearance.TextHAlign = Infragistics.Win.HAlign.Left
                End If
            Next
        End Sub

        Protected Shared Function IsDataColumn(ByVal columnKey As String) As Boolean
            columnKey = columnKey.ToLower
            If columnKey.Contains("column1") Then
                Return False
            Else
                Return True
            End If
        End Function

Children
No Data