This is a migrated thread and some comments may be shown as answers.

Loading grid with column combobox

3 Answers 701 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Вадим
Top achievements
Rank 1
Iron
Iron
Вадим asked on 27 Jun 2017, 07:14 PM

The grid is loaded through the Bindingsource, adding, deleting, editing is included in the grid. How to make so that in the first column there was a comboBox and at data loading in, to the combo box the data was substituted.

I did, but I do not understand correctly.

_bindingSourceSurvey = new BindingSource { DataSource = commandServer.GetDataGridSet(@"select * from GetSurvey(" + _keyAlone + ")").Tables[0] };
radGridView2.Invoke(new MethodInvoker(delegate ()
{

GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn("Phone");

comboColumn.DataSource = _bindingSpeziolist;

radGridView2.Columns[1] = comboColumn;

radGridView2.DataSource = _bindingSourceSurvey;

}));

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Jun 2017, 12:31 PM
Hello Вадим, 

Thank you for writing.  

Please refer to the following help article demonstrating how to add a GridViewComboBoxColumn, bind it to a DataSource collection: http://docs.telerik.com/devtools/winforms/gridview/columns/column-types/gridviewcomboboxcolumn

Note that it is important to specify the GridViewComboBoxColumn.FieldName property. Thus, the column will be populated with the respective data considering the specified DataSource's field.

You can refer to our Demo application >> GridView >> Columns >> Column Types example. The Demo application is located in the installation folder of the suite.

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jegan Sivathanu
Top achievements
Rank 1
answered on 07 Jul 2017, 07:36 AM
Hi,
I have three column in my Rad gridview.1st and 2 nd columns are Text box column 3 rd column is GridViewComboBoxColumn.i need to add items in combobox in dynamically based on some condition.for example if the first cell value is "String1" means the combo box items would be three value.if cell value is "string2" means the combo box items values are 4 values.how we can proceed with telerik grid.
Thanks in advance
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Jul 2017, 07:44 AM
Hello Jegan, 

Thank you for writing.  

Please refer to the following KB article which is quite useful for filling the values in a GridViewComboBoxColumn considering the value from another cell: http://www.telerik.com/support/kb/winforms/gridview/details/cascading-comboboxes-in-radgridview

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Вадим
Top achievements
Rank 1
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jegan Sivathanu
Top achievements
Rank 1
Share this question
or