I want to do if E-MAIL ADDRESS is empty then Column readonly=false else readonly=true .
SqlCommand cmd = new SqlCommand("SELECT TOP 2 MAILADD 'E-MAIL ADRESS' FROM TABLE", conn);
DataTable tablo = new DataTable();
conn.Open();
SqlDataReader oku = cmd.ExecuteReader();
tablo.Load(oku);
gridControl1.DataSource = tablo;
for (int i = 0; i < gridView1.RowCount; i++)
{
if (gridView1.GetRowCellValue(i, "E-MAIL ADRESS").ToString() == "")
{
//gridView1.Columns[i].OptionsColumn.AllowEdit = false;
MessageBox.Show("EMPTY");
}
else
{
MessageBox.Show("FULL");
//gridView1.Columns["E-MAIL ADRESI"].OptionsColumn.AllowEdit = true;
}
}
}
}
}
Demir AcarPosted Sep 15, 2014, 1:51 PM
empty or null E-mail field editable =true Else =False .
Thanks in advance .
Nitesh KejriwalPosted Sep 14, 2014, 10:44 PM