/// <summary> /// SetupSortColumn /// </summary> /// <param name="sortInfo"></param> /// <param name="selectorCtl"></param> /// <param name="ascendingCtl"></param> /// <param name="descendingCtl"></param> void SetupSortColumn( SortInfoMsx sortInfo, ColumnSelectorControl selectorCtl, CheckEdit ascendingCtl, CheckEdit descendingCtl, EventHandler editValueChangedEventHandler = null) { if (sortInfo == null) { sortInfo = new SortInfoMsx(); } selectorCtl.OptionIncludeNoneItem = true; AxisMsx axis = new AxisMsx(); DataColumnMsx dc = sortInfo.DataColumnReference; if (dc != null) { axis.Expression = ExpressionUtilities.EscapeIdentifier(dc.DataTable?.Name) + "." + (dc.Name); } selectorCtl.Setup(axis, V, SVP, editValueChangedEventHandler); if (sortInfo.SortOrder == SortOrderMsx.Ascending) { ascendingCtl.Checked = true; } else { descendingCtl.Checked = true; } return; }
/// <summary> /// Setup /// </summary> /// <param name="expr"></param> /// <param name="svm"></param> /// <param name="editValueChangedEventHandler"></param> public void Setup( AxisMsx axis, VisualMsx visual, SpotfireViewManager svm, EventHandler editValueChangedEventHandler = null) { Axis = axis; AxisExpressionList = AxisExpressionListMsx.Parse(axis.Expression); MultiExpressionSelectionAllowed = axis.MultiExpressionSelectionAllowed; // (not correct) Visual = visual; SVM = svm; CallerEditValueChangedHandler = editValueChangedEventHandler; SetupLayoutPanel(); return; }
/// <summary> /// Setup the dropdown for a Column(s) expression /// </summary> /// <param name="parsedColExpr"></param> /// <param name="axis"></param> /// <param name="visual"></param> /// <param name="b"></param> /// <param name="parentColumnExressionSelectorControl"></param> /// <param name="callerEditValueChanged"></param> public void Setup( ParsedColumnExpressionMsx parsedColExpr, AxisMsx axis, VisualMsx visual, DropDownButton b, ColumnsSelector parentColumnExressionSelectorControl, EventHandler callerEditValueChanged = null) { InSetup = true; ParsedColExpr = parsedColExpr; Axis = axis; Visual = visual; InvokingButton = b; PC = parentColumnExressionSelectorControl; SVM = PC.SVM; CallerEditValueChanged = callerEditValueChanged; DataTableMsx dt = GetSelectorDataTable(); if (dt != null) { TableSelector.Name = dt.Name; } else { TableSelector.Name = ""; } List <DataTableMsx> tables = Axis.GetAllowedDataTables(); ColumnList.Items.Clear(); string selectedColName = null; if (parsedColExpr.ColumnNames.Count > 0) { selectedColName = parsedColExpr.ColumnNames[0]; } foreach (DataColumnMsx col in dt.Columns) { CheckedListBoxItem item = new CheckedListBoxItem(); item.Description = col.Name; if (Lex.Eq(col.Name, selectedColName)) { item.CheckState = CheckState.Checked; } ColumnList.Items.Add(item); } //DataMapControl.ShowSelectedColumnCheckBoxes = true; //DataMapControl.SelectSingleColumn = true; //DataMapControl.ShowTableControls = false; //DataMapControl.Setup(SVM, DataMapSelectedColumnChanged); ////DataMapControl.MobiusTableNameCol.Visible = false; ////DataMapControl.MobiusColNameCol.Visible = false; //DataMapControl.FieldGridView.OptionsView.ColumnAutoWidth = false; ////DataMapControl.FieldGridView.OptionsView.ShowColumnHeaders = false; InSetup = false; return; }