How to hide model ID in mvc grid edit popup

2 posts, 0 answers
  1. Andrés
    Andrés avatar
    6 posts
    Member since:
    Aug 2015

    Posted 25 Sep 2015 Link to this post

    Hi, 

    I'm working with telerik mvc grid, I'm trying to use the grid for crud operations, my model is supposed to have an id key which is stored in the model view item ut the user is not supposed to even know the id property can you help me not showing the id field in the edit popup. 

     

     

    Best 

    A. Guzman 

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 28 Sep 2015 Link to this post

    Hello Andrés,

    In this case you could use the approach from our demos and decorate the Id property with the Scaffold(false) attribute.
    E.g.

    [ScaffoldColumn(false)]
    public int ProductID
    {
        get;
        set;
    }

    This approach should only be used if an Id column will not be displayed in the Grid.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top