Model Editable definition for PopUp edit mode

3 posts, 1 answers
  1. Dimitrij
    Dimitrij avatar
    8 posts
    Member since:
    Apr 2015

    Posted 15 Apr 2015 Link to this post

    I found out that defining "Editable(false)" for a model field doesn't seem to work when I've chosen GridEditMode.PopUp:

        .Columns(columns => ...)
        .Editable(editable => editable.Mode(GridEditMode.PopUp))
        .DataSource(dataSource => dataSource
            .Model(model =>
                model.Id(p => p.Id);
                model.Field(p => p.Id).Editable(false);
                model.Field(p => p.MyReadOnlyField).Editable(false);

    In this case, the "Id" field and the "MyReadOnlyField" field will be shown in the popup as editable - which obviously is not the expected behavior.

    Is this done intentional or is it a bug that Model definition doesn't work correctly with PopUp edit mode? Of course I can define a custom template, but that's not what I really want... from my view it's a bug or missing feature.


    Thanks in advance,


  2. Answer
    Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 16 Apr 2015 Link to this post

    Hello Dimitrij,

    Please add the following DataAnnotation attribute  [HiddenInput(DisplayValue = false)]  to the Model property as shown in this article


    Boyan Dimitrov

    See What's Next in App Development. Register for TelerikNEXT.

  3. Dimitrij
    Dimitrij avatar
    8 posts
    Member since:
    Apr 2015

    Posted 16 Apr 2015 in reply to Boyan Dimitrov Link to this post

    Hi Boyan,

    thanks, this works fine. You should consider to move this valuable information to a more prominent place in your documentation.

    Kind regards,

Back to Top