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

[Solved] Display column in grid but not detail screens

2 Answers 74 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.
Dan Miser
Top achievements
Rank 1
Dan Miser asked on 23 Jul 2011, 04:22 AM
Assume I have a ViewModel that has this:
        [DisplayName("Location")]
        [UIHint("Location")]
        public int? LocationId { get; set; }

        [DisplayName("Location")]
        public string LocationName { get; set; }

The LocationId property is used so I can provide a dropdown box in the insert/edit screens.
The LocationName property is used so I can see the location name in the grid and get things like filtering on the grid.

However, when I go to the Insert/Edit screen, both "Location" controls are created. Is there an attribute I can use, or another way to use the string on the grid and the id on the insert/edit screen?

2 Answers, 1 is accepted

Sort by
0
Dan Miser
Top achievements
Rank 1
answered on 26 Jul 2011, 04:07 AM
Any thoughts here? Need any more information? Is this possible?

Thanks.
0
Dan
Top achievements
Rank 1
answered on 26 Jul 2011, 08:28 PM
Tags
Grid
Asked by
Dan Miser
Top achievements
Rank 1
Answers by
Dan Miser
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Share this question
or