public static void FillCollection(Infragistics.Web.UI.ListControls.WebDropDown control, string key, string value, object data, bool isAddSelect = true) { control.DataSource = data; control.ValueField = key; control.TextField = value; control.DataBind(); if (isAddSelect) control.Items.Insert(0, new Infragistics.Web.UI.ListControls.DropDownItem("--- Select ---", "0")); }
public static void RefreshAndAutoSize(Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid) { try { ultraGrid.DataBind(); foreach (UltraGridBand band in ultraGrid.DisplayLayout.Bands) { foreach (UltraGridColumn column in ultraGrid.DisplayLayout.Bands[band.Key].Columns) { column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand); } } ultraGrid.Refresh(); } catch { } }
/// <summary> /// 初始化曲线图表数据源 /// </summary> private void InitultraChartDatasource(Infragistics.Win.UltraWinChart.UltraChart chart) { DataTable temp = new DataTable(); DataRow curerow = temp.NewRow(); temp.Rows.Add(curerow); DataColumn dc = new DataColumn("ZL", typeof(double)); temp.Columns.Add(dc); temp.AcceptChanges(); chart.DataSource = temp; chart.DataBind(); }