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

GridViewCombobox column

10 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bhavin
Top achievements
Rank 1
Bhavin asked on 09 Dec 2010, 05:42 AM
Hello all,

I have designed a Gridview chich has a datasource and contains 2 combobox columns.
the first combobox column is for Department, ValueMember=ID and DisplayMember = Name.
The second combobox column is for operations, valuemmember=id and displaymember=operation.

no what happenes, when the gridview is loaded, the department combobox and operations combobox both are filled with all the values,

i want to fill the Operations Combobox Column based on the value of the Department combobox column.

How to achieve this?

Thanks in Advance.

10 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 09 Dec 2010, 08:49 AM
Hello,

Please take a look at this forum post which describes this scenario and has an example project attached.

Hope that helps
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 10 Dec 2010, 12:20 PM
Hello,

how did this go? If it helped, please remember to mark as answer.
Thanks
Richard
0
Jegan Sivathanu
Top achievements
Rank 1
answered on 07 Jul 2017, 07:32 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

 

Jegan.

 

0
Hristo
Telerik team
answered on 07 Jul 2017, 10:28 AM
Hello ,

Thank you for writing.

You can subscribe to the CellEditorInitialized event and in the handler, bind the RadDropDownListEditor to whatever data source you want to display. Please check the following documentation article: http://docs.telerik.com/devtools/winforms/gridview/editors/handling-editors'-events.

Additionally, you can check our cascading combo boxes example: http://www.telerik.com/support/kb/winforms/gridview/details/cascading-comboboxes-in-radgridview.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
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, 11:05 AM

Thank you for your reply Hristo's.hope this helpful!.

Jegan

 

 

0
Muhammad Naveed
Top achievements
Rank 1
answered on 10 Jul 2017, 12:42 PM

How can i did this with database?

Actually i want to populate data from database table in GridViewComboBoxColumn.

It shows empty GridViewComboBoxColumn.

0
Hristo
Telerik team
answered on 10 Jul 2017, 01:44 PM
Hello Muhammad,

Thank you for writing.

When binding RadGridViewComboBox column it is important to set the ValueMember and DisplayMember properties of the column. They need to be present on your data source object. Detailed information is available here: http://docs.telerik.com/devtools/winforms/gridview/columns/column-types/gridviewcomboboxcolumn.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
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
Muhammad Naveed
Top achievements
Rank 1
answered on 11 Jul 2017, 05:04 AM

I am doing the same process as you defined,

but combobox shows empty and when i click on it will displayed error as ..

" An unhandled exception of type 'System.FormatException' occurred in Telerik.WinControls.GridView.dll "

 

0
Hristo
Telerik team
answered on 11 Jul 2017, 07:26 AM
Hi Muhammad,

Thank you for writing back.

We are not aware of a similar issue. You can test with the attached sample project which properly populates the GridViewComboBoxColumn

In case you keep experiencing issues please open a support ticket and send us your project.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
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
Muhammad Naveed
Top achievements
Rank 1
answered on 11 Jul 2017, 10:06 AM
Thank You @Hristo for providing fast and a meaningful solution which overcomes my problem.
Tags
GridView
Asked by
Bhavin
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Jegan Sivathanu
Top achievements
Rank 1
Hristo
Telerik team
Muhammad Naveed
Top achievements
Rank 1
Share this question
or