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
920
combo box in grid not populating with selections
posted

I load a grid and bind it to datasource1, then i load an UltraComboBoxEditor and bind it with datasource2.  When I run it there are no values in the combobox even though during debugging i can see that there should be two selections:

DataBind Grid:

private void LoadBindingSource(BindingSource bindingSource)
{
         grid.SuspendLayout();
         try
         {
            if (bindingSource == null)
               throw new ArgumentNullException("bindingSource");
            _gridBindingSource = bindingSource;
            DataSource = _gridBindingSource;
            DataBind();
         }
         finally
         {
            grid.ResumeLayout(true);
         }
}
 


Format Columns:

 

public void FormatGrid(IGridColumnFormatter gridColumnFormater)

      {

...

               foreach (ColumnFormatItem formatItem in columnFormatItemList)

               {

                  if (columns.Exists(formatItem.Key) && columns[formatItem.Key].IsBound)

                  {

                     UltraGridColumn column = columns[formatItem.Key];

                     column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Edit;

                     column.Hidden = false;

                     column.Header.VisiblePosition = formatItem.Order;

                     column.Header.Caption = formatItem.Name;

                    ...

                     if (formatItem.LookupList != null)

                     {

                        var control = new Infragistics.Win.UltraWinEditors.UltraComboEditor();

                        control.DataSource = formatItem.LookupList;

                        control.DisplayMember = NoteValueSelectionChild.Field.SelectionValue.ToString();

                        control.ValueMember = NoteValueSelectionChild.Field.NoteValueId.ToString();

                         switch (formatItem.DisplayType)

                        {

                           case ColumnFormatItem.CellDisplayType.ComboList:

                              column.EditorComponent = control;

                              break;

                           case ColumnFormatItem.CellDisplayType.MultiSelect:

                              control.CheckedListSettings.CheckBoxStyle = CheckStyle.CheckBox;

                              control.CheckedListSettings.CheckBoxAlignment = ContentAlignment.MiddleLeft;

                              control.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems;

                              control.CheckedListSettings.ItemCheckArea = ItemCheckArea.Item;

                              control.CheckedListSettings.ListSeparator = ", ";

 

                              column.EditorComponent = control;

                              break;

                        }

                     }

                  }

               }

            }

         }

      }

 

and sorry for the doube space but hey I just tried everything i could and nothing works.  It would help if people could simply copy/paste from VS in here.

 

so apparently i'm not doing something right with my column settings?