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
200
DropDownList in UltraWinGrid doesn't display anything, why?
posted

There is one column in my ultra wingrid which has a valuelist bound to this column, but after I load this wingrid, the column with the valuelist is empty, it doesn't display anything, there is even no drop down arrow on this column.

The code is:

            DataSet ds = dataset with data from database ;
            BindingSource source = new BindingSource();
            source.DataSource = ds.Tables["TableNamel"];
            this.UltraWinGrid.DataSource =source;

            BindValueList();

 Now I create a new value list and add a new column to this ultra win grid, bind this new column to the newly created value list:

BindValueList()

{
            this.UltraWinGrid.DisplayLayout.ValueLists.Add("ValueList");

            this.UltraWinGrid.DisplayLayout.ValueLists["ValueList"].ValueListItems.Add("1", "1");
            this.UltraWinGrid.DisplayLayout.ValueLists["ValueList"].ValueListItems.Add("2", "2");
            this.UltraWinGrid.DisplayLayout.ValueLists["ValueList"].ValueListItems.Add("3", "3");
            this.UltraWinGrid.DisplayLayout.ValueLists["ValueList"].ValueListItems.Add("4", "4");

           this.UltraWinGrid.DisplayLayout.Bands[0].Columns.Add("NewColumn", "NewColumn");
            this.UltraWinGrid.DisplayLayout.Bands[0].Columns["NewColumn"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
            this.UltraWinGrid.DisplayLayout.Bands[0].Columns["NewColumn"].ValueList = this.UltraWinGrid.DisplayLayout.ValueLists["ValueList"];

}

 But,when I run the project,after the grid is loaded, on the column of "NewColumn" there is nothing, not even the drop down arrow, the whole column is empty, I clicked on one cell of this column, there is still nothing appearts.

who knows why? is it because of the binding source of this ultra win grid?