|
this.sfDataGrid1.Columns.Add(new GridComboBoxColumn() { MappingName = "ShipCityID", HeaderText = "Ship City", DisplayMember = "ShipCityName", ValueMember = "ShipCityID", DropDownStyle = DropDownStyle.DropDownList, DataSource = bindingSource.DataSource }); |
|
this.sfDataGrid1.Columns.Add(new GridComboBoxColumn() { MappingName = "ShipCityID", HeaderText = "Ship City", DisplayMember = "ShipCityName", ValueMember = "ShipCityID", DropDownStyle = DropDownStyle.DropDownList, DataSource = bindingSource.DataSource }); |
|
sfDataGrid.Columns.Add(New GridComboBoxColumn() With {.MappingName = "SalesType", .HeaderText = "Sales Types", .DisplayMember = "SalesType", .ValueMember = "SalesType", .DropDownStyle = Syncfusion.WinForms.ListView.Enums.DropDownStyle.DropDownList, .DataSource = bindingSource.DataSource}) |
|
Is there a way around this or am I to hide the original "SalesType"column (the one generated when I set the datasource of the grid manually) |
You can skip a column from being auto generated by using AutoGeneratingColumn event. Please refer the below code example
Code Example
| |
|
What is the code to move a column's position in the grid so that instead of showing up in the last column of the grid it shows up as the second column of the grid? |
You can insert GridComboBoxColumn as second column by using Insert method. Please refer the below code example
Code Example
|
|
Is there a way to create a two column combobox with one column containing an abbreviation for an item and the second a longer name and add it to the sfdatagrid? |
Currently we don’t have support for GridMultiColumnComboBoxColumn in SfDataGrid. We have added this feature to our feature request list. It will be available in any of our upcoming releases. |
|
Will the release 3 have BindingSource support for GridComboBoxColumn? |
Yes. BindingSource support for GrodComboBoxColumn will be available in our 2018 Volume 3 release which is expected to be rolled out in Mid of September (2018) |