private void radGridView2_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement.ColumnInfo.HeaderText == "Amount" && customers.ToList<Customer>()[e.CellElement.RowIndex].Amount < 10 )
{
check =
true;
}
if
(this.radGridView2.Columns[e.CellElement.ColumnIndex].UniqueName == "Type1")
{
if (check)
{
((Telerik.WinControls.UI.
GridComboBoxCellElement)(e.CellElement)).Visibility = ElementVisibility.Hidden;
check =
false;
}
}
GridViewComboBoxColumn combo = new GridViewComboBoxColumn();
combo.HeaderText =
"Type1";
combo.UniqueName =
"Type1";
combo.DataSource =
this.BindData();
combo.DisplayMember =
"KeyValue";
combo.ValueMember =
"StringValue";
this.radGridView2.Columns.Add(combo);
GridViewTextBoxColumn data = new GridViewTextBoxColumn();
data.HeaderText =
"Amount";
data.UniqueName =
"Amount";
data.FieldName =
"Amount";
this.radGridView2.Columns.Add(data);