You must Sign In to post a response.
  • Category: ASP.NET

    How to change style of specific page not current page in gridview

    My page have grid and button control.Grid contain checkbox control.User can select multiple row by checking checkbox.After that user click on Button.Selected row data can insert into database.Again user can come on second page select some row's checkbox and click on Button.I want to change style of pages whose data is already inserted into database like 1,2.How to do that?Following code changes style of current page number.

    <style type="text/css">
    .cssPagerFormat span {
    background-color: #FFFFFF;color:#000000;
    font-size: 18px;
    }
    </style>

    PagerStyle-CssClass="cssPagerFormat"
  • #762487
    Hi

    If you change gridview row change color means try this code




    if (e.Row.RowType == DataControlRowType.DataRow)
    {
    int sno = int.Parse(e.Row.Cells[1].Text);

    foreach (TableCell cell in e.Row.Cells)
    {

    cell.BackColor = Color.Red;
    }
    }


    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #762488
    Thanks for reply.I want to change style/color of page number of grid whose data already inserted into database.Above code will change color of second cell.I don't want that.

  • #762489
    Hi

    Can you share your code or send me.

    can you share snapshot for this in the row databound use this code.

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.


Sign In to post your comments