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

[Solved] Style certain specific rows

0 Answers 21 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.
Ryan
Top achievements
Rank 1
Ryan asked on 03 Dec 2010, 12:49 PM
I have a grid;

Html.Telerik().Grid<BankingDetailsInfo>(Model)
        .Name("PreexistingBeneficiariesGrid")
        .Columns(columns =>
        {
            columns.Template(x => Html.ActionLinkWithImage("/Beneficiaries/Detail/" + x.Id,
                Links.Content.Images.info_png).ToHtmlString()).Title("").Width(30);
                 
            columns.Bound(x => x.AccountName).Title("Account Name").Width(160);
            columns.Bound(x => x.AccountNumber).Width(120);
            if (Model[0].AccountCCY.DisplayName.Equals("USD"))
                columns.Bound(x => x.ABA).Width(220);
            else
                columns.Bound(x => x.IBAN).Width(220);
            columns.Bound(x => x.SortCode).Width(80);
            columns.Bound(x => x.BIC).Title("SWIFT").Width(110);
            columns.Bound(x => x.AccountDescription).Title("Description");
            columns.Bound(x => x.IsActive).Template(x => x.IsActive ? "Active" : "Inactive").Title("Status").Width(70);
        })
        .Sortable(sorting => sorting
            .SortMode(GridSortMode.SingleColumn)
            .OrderBy(order => order.Add(bdi => bdi.AccountName))
        )
        .Pageable(page => page.PageSize(5))
        .Scrollable(scroll => scroll.Height(150))
        .Filterable()
        .Render();

I want to make the style so that if x.IsActive is false the color of the text of that row is a pale grey or something

How can this be done?
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Share this question
or