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
70
Auto adjust size in DropDownEditorButton
posted

Hello. I`m using DropDownEditorButton to create a dropDown cell in a grid, containing list if checkboxes. 

1) How can I auto adjust size of DropDown container, so with of container was equals to with of cell?

2) I`ve got a cell with a dropdown, but when user clicks on a dropdown button - nothing happened. Only after user`s doubleclick on a cell (to switch it in an edit mode), user can use a dropdown button. How can I bypass this?

My code is:

 

 UltraListView listView = new UltraListView();

                listView.Items.AddRange(items.ToArray());

                listView.ItemSettings.AllowEdit = DefaultableBoolean.True;

                listView.View = UltraListViewStyle.List;

                listView.ViewSettingsList.CheckBoxStyle = CheckBoxStyle.CheckBox;

                listView.ItemCheckStateChanged += ReportCheckChanged;

 

                listView.ViewSettingsList.MultiColumn = false;

                listView.ViewSettingsList.ImageSize = System.Drawing.Size.Empty;

                DropDownEditorButton button = new DropDownEditorButton

                {

                    Control = listView

                };

 

                reportsTextEditor_ = new UltraTextEditor {ReadOnly = true};

                reportsTextEditor_.ButtonsRight.Add(button);

 

                valueCell.EditorControl = reportsTextEditor_;

                valueCell.Style = ColumnStyle.Edit;