Popup Edit Mode hide ID column

3 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 17 Jul 2015 Link to this post

    Hi,

     

    I have table which contains an ID column (Identity) and several other fields.

    If I use "Inline" I can edit and add records.

    The ID column is (as intended) not visible.

    But a soon as I change to "Popup" the ID column shows up as edit field.
    I changed the field to readonly via model.Field(p => p.​ID).Editable(false);
    Still I have an edit field for the ID - and I can change the value (although this is not persisitet to the DB).

    So how to hide the column in Popup edit mode.

    Manfred

  2. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 20 Jul 2015 in reply to ManniAT Link to this post

    Hi,

     I could fix this adding "[ScaffoldColumn(false)]" to the column in my datamodel.

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 21 Jul 2015 Link to this post

    Hi ManniAT,

    Indeed that is the recommended approach. Alternatively, you could specify an entirely custom Editor Template, as shown here.

    Regards,
    Alexander Popov
    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
Back to Top