Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Display list of values in ultra-drop down in ultra grid based on conditional
posted

I have to display list of values in ultra-drop down in ultra grid based on conditional.

  • If all grid row values is “No” the drop down list is working fine
  • If grid row values is “yes” the drop down list is No-edit mode and working fine as expected.
  • If grid row values is “Yes/No” the drop down list of values is displaying for both but in this scenario if grid values is “yes” the drop down should not be editable

 

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;

                    UltraGridColumn column = this.grdContracts.DisplayLayout.Bands[0].Columns["Value "];              

                    column.CellActivation = Activation.AllowEdit;

                }             

            }

                      

        }

Parents Reply Children
No Data