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

[Solved] Display Template in Grid

0 Answers 22 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.
Frank
Top achievements
Rank 1
Frank asked on 10 Aug 2011, 01:57 PM
HI to All,

I built the follwing template and decorate the property  as follow:

 [Display(Name = "Total")]
            [DataType(DataType.Text)]
            [UIHint("UploadListTotal")]
            public Decimal Total { get; set; }

But the Display templates is not visible in the grid


@model UploadListModel
@switch (Model.ImportFileFormatId)
{
    case 1:
        break;
    case 2:
        break;
    case 3:
        //Rebate
    <table>
        <tr>
            <td>
                @Html.LabelFor(m => m.Rebate);
            </td>
            <td>@Model.Rebate
            </td>
        </tr>
    </table>
           break;
    case 4:
           //Sellout
    <table>
        <tr>
            <td>
                @Html.LabelFor(m => m.Sellout);
            </td>
            <td>@Model.Sellout
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(m => m.DiscountGPR);
            </td>
            <td>@Model.DiscountGPR
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(m => m.DiscountTTS);
            </td>
            <td>@Model.DiscountTTS
            </td>
        </tr>
    </table>
           break;
    case 5:
           //Discount
    <table>
        <tr>
            <td>
                @Html.LabelFor(m => m.Discount);
            </td>
            <td>@Model.Discount
            </td>
        </tr>
    </table>
           break;
    case 6:
           break;
    case 7:
           break;
    default:
           break;


}
Tags
Grid
Asked by
Frank
Top achievements
Rank 1
Share this question
or