Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / Set UltraGrid Header Alignment and Hide Child Bands

Set UltraGrid Header Alignment and Hide Child Bands

New Discussion
Reyian
Reyian asked on Oct 23, 2008 2:51 PM

anyone?

 

and one more thing, i have set the datasource at runtime.

each item in that source has a list of other objects, it turns out that

the grid displays child bands for each of the list members, where

I can expand and unexpand. How to prevent that from displaying.

Sign In to post a reply

Replies

  • 0
    Andrew
    Andrew answered on Oct 21, 2008 3:05 PM

    grid.DisplayLayout.Override.ExpansionIndicator = ShowExpansionIndicator.Never;

  • 0
    Mike Saltzman
    Mike Saltzman answered on Oct 21, 2008 4:03 PM

    What exactly do you mean by the alignment of the column header? Do you mean the alignment of the text in the header? That's controlled by the HeaderAppearance. There's properties on the appearance for TextVAlign, TextHAlign, ImageVAlign, and ImageHAlign. 

    • 0
      Reyian
      Reyian answered on Oct 22, 2008 3:43 AM

      Yes the text in the column header, I think by default it is Center, I want it to be left align.

      I write this code in the grid InitializeLayout method

      e.Layout.Bands[0].Columns["colKey"]…… header text left align. I dont know how to do it.

      And how can I set the utragrid to multiselect rows, and then how can I get the objects in the 

      selected rows? Thanks in advance and more power.

      • 0
        Arun Rajaraman
        Arun Rajaraman answered on Oct 22, 2008 7:44 AM

        Hi …

         

        ''for header text alignment

        UltraGrid1.DisplayLayout.Bands(0).Override.HeaderAppearance.TextHAlign = Infragistics.Win.HAlign.Left

        ''to multiselect rows

        e.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect

        UltraGrid1.DisplayLayout.Bands(0).Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Extended

      • 0
        Reyian
        Reyian answered on Oct 22, 2008 9:32 AM

         Wheeeewww!! Awesome, Thanks

        One more thing, how can I manipulate the order of the columns

        in the grid, im binding the data source at runtime.

         

      • 0
        Mike Saltzman
        Mike Saltzman answered on Oct 22, 2008 2:30 PM

        You can set the column.Header.VisiblePosition.

        The InitializeLayout event is a good place to do all of this. 

      • 0
        Reyian
        Reyian answered on Oct 23, 2008 2:21 AM

         Thank you. I have one more problem and I cant figure out the solution.

         Im supplying the data source at runtmine (it is an IList). Everytime I remove 

        an Item to that List the grid updates(remove row) but when I added Item to the 

        List, the grid doesn't update (no new row being created).

        I tried the Update and UpdateData in the grid but nothings happen.

        How I am going to do this?

      • 0
        Andrew
        Andrew answered on Oct 23, 2008 2:51 PM

        The IList interface doesn't support notifications for changes in data such as changes in cell values, adding or removing of rows, etc. Therefore if you want to support these operations in your data source then it is recommended that you implement the .NET IBindingList interface or use BindingList instead, which has support for notifying the bound controls of such changes.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Reyian
Favorites
0
Replies
8
Created On
Oct 23, 2008
Last Post
18 years ago

Suggested Discussions

Tags

Created by

Created on

Oct 23, 2008 2:51 PM

Last activity on

Feb 11, 2026 8:09 PM