Me.sfDataGrid.CellRenderers.Remove("ComboBox")
Me.sfDataGrid.CellRenderers.Add("ComboBox", New GridComboBoxCellRendererExt())
Public Class GridComboBoxCellRendererExt
Inherits GridComboBoxCellRenderer
Protected Overrides Sub OnInitializeEditElement(ByVal column As DataColumnBase, ByVal rowColumnIndex As RowColumnIndex, ByVal uiElement As SfComboBox)
MyBase.OnInitializeEditElement(column, rowColumnIndex, uiElement)
uiElement.ShowDropDown()
End Sub
End Class
But, unfortunately, the combo does not open in 1-click mode... If I do a double-click on it, ok, the options open.
Do you know what am I doing wrong?
I appreciate in advance for any help.
orderInfo = new OrderInfoCollection();
this.sfDataGrid1.EditMode = EditMode.SingleClick;
this.sfDataGrid1.DataSource = orderInfo.OrdersListDetails;
this.sfDataGrid1.AutoSizeColumnsMode = AutoSizeColumnsMode.Fill;
this.sfDataGrid1.Columns.Add(new GridNumericColumn() { MappingName = "OrderID", HeaderText = "Order ID"});
this.sfDataGrid1.Columns.Add(new GridCheckBoxColumn() { MappingName = "IsClosed", HeaderText = "Closed", AllowCheckBoxOnHeader = true, CheckBoxSize = new Size(13, 13), Width = 100 });
this.sfDataGrid1.Columns.Add(new GridComboBoxColumn() { MappingName = "ShipCityID", HeaderText = "Ship City", DisplayMember = "ShipCityName", ValueMember = "ShipCityID", DropDownStyle = DropDownStyle.DropDownList, DataSource = orderInfo.ShipCityDetails });
this.sfDataGrid1.Columns.Add(new GridMultiSelectComboBoxColumn() { MappingName = "Products", HeaderText = "Products", DisplayMember = "ProductName", ValueMember = "ProductName", DataSource = orderInfo.ProductDetails });
this.sfDataGrid1.CellRenderers.Remove("ComboBox");
this.sfDataGrid1.CellRenderers.Add("ComboBox", new GridComboBoxCellRendererExt());
|