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

How to hide model ID in mvc grid edit popup

1 Answer 279 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrés
Top achievements
Rank 1
Andrés asked on 25 Sep 2015, 09:18 PM

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 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 28 Sep 2015, 01:18 PM

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
Tags
Grid
Asked by
Andrés
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or