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
685
Edit with Dropdown
posted

I need to edit a cell and when it enters edit mode, I need it to show a dropdown with values that come from a DB.

I can create the dropdown, and it populates, and the dropdown even shows in the cell.  But when I click on the dropdown, nothing happens.

I don't know if it's that the cell's not expanding to show me the values, or if the values are somehow not making it to the cell.

        private void ROGridServerDBs_AfterEnterEditMode(object sender, EventArgs e)
        {
            UltraDropDown drop = new UltraDropDown();
            string column = new GridInfo().GetActiveCellName(ROGridServerDBs);
            if (column == "ServerRole")
            {
                string query = new MEQueries().AppRolesGet();
                UltraGridCell activeCell = ROGridServerDBs.ActiveCell;
                MinionConn mc = new MinionConn();
                drop.DataSource = mc.RunQuery(query);
                drop.ValueMember = "AppRoleName";
                drop.DisplayMember = "AppRoleName";
                activeCell.ValueList = drop;
                activeCell.Refresh();
            }
        }

Parents Reply Children
No Data