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

Adding items to dropdown columns list at run time

2 Answers 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kipp
Top achievements
Rank 1
Kipp asked on 08 Apr 2014, 02:44 PM
I need a dropdown column in my grid which simply lists "Y", and "N".

How can I simply add these values to the dropdown's items in the designer, or at run time?

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 08 Apr 2014, 02:52 PM
Hello Kipp,

Thank you for writing.

To do that, you can add GridViewComboBoxColumn and bind it to a source with the desired objects. Please refer to the following article for more information and example: http://www.telerik.com/help/winforms/gridview-columns-gridviewcomboboxcolumn.html.

I hope that you find this information useful.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Kipp
Top achievements
Rank 1
answered on 08 Apr 2014, 03:12 PM
Thanks, from that I found it is quite simple.


Private Sub BuildDropDownList()
Dim comboColumn As Telerik.WinControls.UI.GridViewComboBoxColumn

comboColumn = Me.RadGridView_Assignments.Columns("rollup_fl")

' set the column data source - the possible column values
comboColumn.DataSource = New [String]() {"N", "Y"}

End Sub
Tags
GridView
Asked by
Kipp
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Kipp
Top achievements
Rank 1
Share this question
or