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

Hide prop when edit, show in grid!

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frode Solheim
Top achievements
Rank 1
Frode Solheim asked on 20 Sep 2010, 04:16 PM
Hi. I have a grid were a model property should be visible in the grid but not when Ajax editing using popup mode. If I decorate the model attribute with [ScaffoldColumn(false)] then it also disappears from the grid even it is bound using Ajax binding and not in edit mode. But I only wan't it to not show when editing. Is it possible to do that? Help is appreciated!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Sep 2010, 04:19 PM
Hi Frode Solheim,

 The only way I can think of is to create an editor template for this template and make it empty:

  1. Decorate your property with the UIHint attribute:
    [UIHint("Empty")]
    public string MyProperty {get;set;}
  2. Add an empty partial view named Empty.ascx in ~/Views/Shared/EditorTemplates (create the latter if it does not exist)


Greetings,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Frode Solheim
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or