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;
1) If you set the width of the UltraListView, the dropdown will size itself around that.
2) I tried this and with the UltraGrid.DisplayLayout.Override.CellClickAction property set to 'Edit', it worked as expected. You stated that the user has to double-click on a cell to get it into edit mode, so I'm not sure what properties you set to get that happening but if you are able, attach a simple sample that demonstrates the problem and we can take a look.
1) Tnx, this was helpful
2) I do not know, why it is working wrong. I have already resolved this case by using EditorWithComboEmbedded, and turning off his combo button (just used it instead of UltraTextEditor)
Tnx for your reply.
archeg said:1) How can I auto adjust size of DropDown container, so with of container was equals to with of cell?
The size of the dropdown is determined by the size of the DropDownEditorButton.Control. So resize the control to whatever size you want. In this case, you probably want to use the BeforeCellListDropDown event of the grid so you can size it to the cell just before it drops down.
archeg said: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?
I'm not sure if there's any way to do this. You should post this question in the ListView forum. This forum is for WinGrid.