I have to display list of values in ultra-drop down in ultra grid based on conditional.
Below is my code:
private void Loadvalues()
{
ArrayList ValueType = new ArrayList();
DataSet ds = null;
DateType.Add("No");
DateType.Add("Suspend");
ds = objMem.GetOwnervalues(objfuleId.FileId);
foreach (DataRow row in ds.Tables["OwnerID"].Rows)
if (Convert.ToString(row["Value"]) == ("Yes"))
UltraGridColumn column = this.grdContracts.DisplayLayout.Bands[0].Columns["Value "];
column.CellActivation = Activation.NoEdit;
}
else
_ValueUltraDropDown.DataSource = DateType;
_ ValueUltraDropDown.Rows[0].Selected = true;
column.CellActivation = Activation.AllowEdit;
Hello Muniraja,
Thank you for contacting Infragistics!
Looking at your code you when you convert the value to string you do a check for the exact match of “Yes”, so when the value contains both yes and no it will go to your else statement an allow editing. You will want to change your check so that it looks to see if the value contains “Yes” instead of exactly being “Yes”.