Exemplo n.º 1
0
            public object GetCellValue(object value, int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo)
            {
                VirtualGridCellValueNeededEventArgs args = new VirtualGridCellValueNeededEventArgs(rowIndex, columnIndex, viewInfo);

                this.OnCellValueNeeded(args);
                return(args.Value);
            }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args)
 {
     base.UpdateInfo(args);
     this.Text = String.Empty;
     if (args.Value is byte)
     {
         this.ratingElement.Value = (byte)args.Value;
     }
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 6
0
            protected override void UpdateInfo(VirtualGridCellValueNeededEventArgs args)
            {
                base.UpdateInfo(args);

                if (args.Value is bool)
                {
                    this.checkBox.Checked = (bool)args.Value;
                }

                this.Text = String.Empty;
            }
Exemplo n.º 7
0
 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);
     }
 }
Exemplo n.º 8
0
        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];
        }
Exemplo n.º 9
0
 protected virtual void radListView1_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e)
 {
 }