public object GetCellValue(object value, int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo) { VirtualGridCellValueNeededEventArgs args = new VirtualGridCellValueNeededEventArgs(rowIndex, columnIndex, viewInfo); this.OnCellValueNeeded(args); return(args.Value); }
protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args) { this.Value = this.ViewInfo.NewRowValues.ContainsKey(this.ColumnIndex) ? this.ViewInfo.NewRowValues[this.ColumnIndex] : (object)null; this.FieldName = args.FieldName; this.FormatString = args.FormatString; this.Text = string.Format(this.FormatString, this.Value); this.IsPinned = true; }
protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args) { base.UpdateInfo(args); this.Text = String.Empty; if (args.Value is byte) { this.ratingElement.Value = (byte)args.Value; } }
protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args) { base.UpdateInfo(args); this.TextAlignment = ContentAlignment.MiddleLeft; if (this.Value == null) { this.Text = "No Color"; } }
protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args) { base.UpdateInfo(args); //约定使用ID列构建Cell,传递ID值 if (args.FieldName == "ID" && args.Value is int) { this.Value = args.Value; } this.Text = string.Empty; }
protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args) { base.UpdateInfo(args); if (args.Value is bool) { this.checkBox.Checked = (bool)args.Value; } this.Text = String.Empty; }
void gridView_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e) { if (e.ColumnIndex < 0) { return; } if (e.RowIndex == RadVirtualGrid.HeaderRowIndex) { e.Value = columnNames[e.ColumnIndex]; } if (e.RowIndex >= 0 && e.RowIndex < dataSource.Count) { e.Value = dataSource[e.RowIndex].GetData(e.ColumnIndex); } }
private void radVirtualGrid1_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e) { if (e.ColumnIndex < 0) { return; } if (e.RowIndex == RadVirtualGrid.HeaderRowIndex) { e.Value = this.columns[e.ColumnIndex]; } if (e.RowIndex < 0) { return; } e.FieldName = this.fields[e.ColumnIndex]; e.Value = this.nwindDataSet.Products.Rows[e.RowIndex][e.FieldName]; e.FieldName = this.fields[e.ColumnIndex]; e.Value = this.nwindDataSet.Products.Rows[e.RowIndex][e.FieldName]; }
protected virtual void radListView1_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e) { }