antosnowin
antosnowin

Reputation: 221

Alternating row style in Gridview

Is it possible to apply alternating row style in gridview column level . I have rowspan for gridview column if the values are equal . I dont alternating row style to be applied for first 2 columns alone. Can anyone help me in achieving this.

Upvotes: 1

Views: 1871

Answers (2)

Cathy Sullivan
Cathy Sullivan

Reputation: 144

I used GridName.AlternatingRowStyle.CssClass = "grdViewAltRow"; in the c# code behind just before

GridName.Datasource = dataTable;
GridName.DataBind();

With

<style>
.grdViewAltRow {
            background-color:#E8E8FF;
        }
</stye>

Upvotes: 0

MikroDel
MikroDel

Reputation: 6735

Use ASPxGridView.Styles.AlternatingRow.Enabled

Upvotes: 2

Related Questions