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

ForeignKey column does not produce dropdown list in popup editing

7 Answers 546 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 12 Dec 2012, 01:12 AM
I have a grid, with a detail grid and some of the fields in the detail grid refer to foreign key columns.When the editimode is set to inline this produces a dropdown list from which the user can pick a value. But if I change the editmode to popup the field is displayed as a textbox with the numeric key value instead of as a drop down list. Is this by design? 

Is it possible for me to extend the Html Helper?

7 Answers, 1 is accepted

Sort by
0
Marcin Butlak
Top achievements
Rank 2
answered on 12 Dec 2012, 08:58 PM
You must define a custom editor look at this example: http://demos.kendoui.com/web/grid/editing-custom.html
0
Martin
Top achievements
Rank 1
answered on 21 Dec 2012, 06:35 AM
The URL you give is totally wrong. I assume you meant http://demos.kendoui.com/web/grid/editing-popup.html but this basically doesn't use Html Helpers and instead does the entire operation in a .html file. 

Why doesn't the Html Helper generate code properly for creating records using a popup. I think the Html Helpers should be made to work. But I have come to the conclusion that everything really has to be done in HTML and JavaScript and JQuery. 

It would be better if the Html helpers could be used because they have all the advantages of intellisense, plus they know all about the fields and can make use of the Data Annotation Attributes. But as it is, we have to repeat all that information which is time consuming and error prone.

0
Petur Subev
Telerik team
answered on 24 Dec 2012, 03:12 PM
Hi,

You just need to decorate your property with the UIHint attribute and specify the template to be GridForeignKey.cshtml one.

Check the attached project

All the best,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dinkar
Top achievements
Rank 1
answered on 08 Jan 2013, 11:20 AM
Hi,
I used same application you have provided but when filter column data is more then we get horizontal scroll bar
but we need vertical scroll bar.

See screenshot...

please reply..
0
Atanas Korchev
Telerik team
answered on 10 Jan 2013, 08:23 AM
Hi,

 This is the default behavior of the dropdownlist. It shows horizontal scrollbar when the item contents are too wide. Showing a vertical scrollbar will not make the long item visible.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ruben
Top achievements
Rank 2
answered on 17 Apr 2013, 09:26 PM
Hi Petur Subev,

can you help me telling me how you changed the language of the buttons (Update -> Actualizar .....) and if you can resize the window.

Thank you.
0
Ruben
Top achievements
Rank 2
answered on 19 Apr 2013, 05:55 PM
Hi ,

can you help me telling me how you changed the language of the buttons (Update -> Actualizar .....) and if you can resize the window.

Thank you.
Tags
Grid
Asked by
Martin
Top achievements
Rank 1
Answers by
Marcin Butlak
Top achievements
Rank 2
Martin
Top achievements
Rank 1
Petur Subev
Telerik team
Dinkar
Top achievements
Rank 1
Atanas Korchev
Telerik team
Ruben
Top achievements
Rank 2
Share this question
or