or
private void GenerateMComboGrids() { mcboInstrument.AutoSizeDropDownToBestFit = true; mcboInstrumentComboElement = mcboInstrument.MultiColumnComboBoxElement; mcboInstrumentComboElement.MultiColumnPopupForm.DropDownAnimationDirection = RadDirection.Left | RadDirection.Down; mcboInstrumentComboElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom; mcboInstrumentComboElement.DropDownHeight = 100; mcboInstrumentComboElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown; mcboInstrumentComboElement.EditorControl.MasterTemplate.AutoGenerateColumns = false; mcboInstrumentComboElement.EditorControl.ShowGroupedColumns = false; mcboInstrumentComboElement.EditorControl.ShowRowHeaderColumn = false; mcboInstrumentComboElement.EditorControl.EnableGrouping = true; mcboInstrumentComboElement.EditorControl.AutoExpandGroups = true; mcboInstrumentComboElement.EditorControl.ShowGroupPanel = false; mcboInstrumentComboElement.RightToLeft = true; GridViewTextBoxColumn column = new GridViewTextBoxColumn("SecurityType"); column.HeaderText = "Security Type"; mcboInstrumentComboElement.EditorControl.Columns.Add(column); GridViewTextBoxColumn column2 = new GridViewTextBoxColumn("InstrumentGroup"); column2.HeaderText = "Instrument Group"; mcboInstrumentComboElement.EditorControl.Columns.Add(column2); GridViewTextBoxColumn column3 = new GridViewTextBoxColumn("Instrument"); column3.HeaderText = "Instrument"; mcboInstrumentComboElement.EditorControl.Columns.Add(column3); mcboInstrumentComboElement.EditorControl.GroupDescriptors.Expression = "SecurityType ASC; InstrumentGroup ASC"; //GroupDescriptor descriptor = new GroupDescriptor(); //descriptor.GroupNames.Add("SecurityType", ListSortDirection.Ascending); //GroupDescriptor descriptor2 = new GroupDescriptor(); //descriptor2.GroupNames.Add("InstrumentGroup", ListSortDirection.Ascending); //mcboInstrumentComboElement.EditorControl.GroupDescriptors.Add(descriptor); //mcboInstrumentComboElement.EditorControl.GroupDescriptors.Add(descriptor2); //mcboInstrumentComboElement.EditorControl.GroupSummaryEvaluate += new GroupSummaryEvaluateEventHandler(EditorControl_GroupSummaryEvaluate); }private void PopulateInstrumentList() { StrategyDistinctInstruments instruments = new StrategyDistinctInstruments(ThisVariation.StrategyVariation); Dictionary<string, BacktestInstrument> uniqueInstruments = instruments.UniqueInstruments; mcboInstrumentComboElement.EditorControl.TableElement.BeginUpdate(); foreach (KeyValuePair<string, BacktestInstrument> kvp in uniqueInstruments) { GridViewRowInfo rowInfo = mcboInstrumentComboElement.EditorControl.Rows.AddNew(); rowInfo.Tag = kvp.Value.Inst; rowInfo.Cells[0].Value = kvp.Value.SecurityType; rowInfo.Cells[1].Value = kvp.Value.InstrumentGroup; rowInfo.Cells[2].Value = kvp.Value.Inst.Name; } mcboInstrumentComboElement.EditorControl.TableElement.EndUpdate(true); }