ForeignKey column does not produce dropdown list in popup editing

8 posts, 0 answers
  1. Martin
    Martin avatar
    39 posts
    Member since:
    Dec 2011

    Posted 11 Dec 2012 Link to this post

    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?
  2. Marcin Butlak
    Marcin Butlak avatar
    26 posts
    Member since:
    Dec 2012

    Posted 12 Dec 2012 Link to this post

    You must define a custom editor look at this example: http://demos.kendoui.com/web/grid/editing-custom.html
  3. Kendo UI is VS 2017 Ready
  4. Martin
    Martin avatar
    39 posts
    Member since:
    Dec 2011

    Posted 21 Dec 2012 Link to this post

    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.

  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 24 Dec 2012 Link to this post

    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!
  6. Dinkar
    Dinkar avatar
    1 posts
    Member since:
    Sep 2012

    Posted 08 Jan 2013 Link to this post

    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..
  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Jan 2013 Link to this post

    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!
  8. Ruben
    Ruben avatar
    2 posts
    Member since:
    Feb 2012

    Posted 17 Apr 2013 Link to this post

    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.
  9. Ruben
    Ruben avatar
    2 posts
    Member since:
    Feb 2012

    Posted 19 Apr 2013 Link to this post

    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.
Back to Top
Kendo UI is VS 2017 Ready