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

Dropdown list in radgrid

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tamás
Top achievements
Rank 1
Tamás asked on 20 May 2014, 09:48 AM
I have a table in MSSQL database which can be loaded to a radgid via sqldatasource. Let's say this is devices table. I have another table where is store device types, for example: desktop,notebook,printer..etc.
Is it possible somehow, to display the conent of devices table, but when adding a new line, or modifying one existing line i would like to choose device type from a dropdownl list (populated form the other table)?

How should i start? I know there is a column type for dropdown list..but should i generate the columns from device table automatically of manually...or whatever :)

Thanks!

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 23 May 2014, 07:02 AM
Hi Tamas,

If you would like to have a dropdown control in one of the RadGrid columns you could use couple of approaches.

The first one is to add a GridDropDownColumn to the RadGrid. This column will automatically render a dropdown control in edit mode. If you would like information on how to configure the column check out the Customize/Configure GridDropDownColumn article. Additionally you could test how the column works in our Column Types demo.

Another approach you could use is to add a GridTemplateColumn and place a RadDropDownList control in its EditItemTemplate. If you choose this method check out the Operations with MS DropDownList in EditItemTemplate of GridTemplateColumn article that describes how a dropdown control could be used in a GridTemplateColumn.


Regards,
Viktor Tachev
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.

 
Tags
Grid
Asked by
Tamás
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or