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
425
Problem with column width after setting hierarchical binding list
posted

Normal 0 21 false false false DE X-NONE X-NONE MicrosoftInternetExplorer4

Hello,

 

I am setting a hierarchical binding list as data source to my grid. After data binding, the first column cannot be resized. See my following code and screen hot. The problem is the sub binding list. Without the sub binding list all works fine. Setting the column width was ignored from the grid.

 

        public Form1()

        {

            InitializeComponent();

 

            ultraGrid1.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.None;

            ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect;

            BindingList<DocumentInfo> documentInfoList = new BindingList<DocumentInfo>();

            DocumentInfo documentInfo = new DocumentInfo();

            documentInfo.Identifier = "123";

            documentInfo.Name = "First";

            documentInfoList.Add(documentInfo);

            ultraGrid1.DataSource = documentInfoList;

            ultraGrid1.DataBind();

ultraGrid1.DisplayLayout.Bands[0].Columns["Identifier"].Width = 200;

        }

 

        private class DocumentInfo

        {

            private string mIdentifier;

            public string Identifier

            {

                get { return mIdentifier; }

                set { mIdentifier = value; }

            }

 

            private string mName;

            public string Name

            {

                get { return mName; }

                set { mName = value; }

            }

 

            private BindingList<DocumentInfo> mSubDocumentList;

            public BindingList<DocumentInfo> SubDocumentList

            {

                get { return mSubDocumentList; }

                set { mSubDocumentList = value; }

            }

        }

 


 

Parents Reply Children
No Data