Rollover GridView

Rollover GridView

By OnRowDataBound event binding

protected void event name (Object SENDER, GridViewRowEventArgs E)
{
for (int I = 0; I <e.Row.Cells.Count; I ++) // Get the total number of columns
{
// If the data row is added title
IF (E == DataControlRowType.DataRow .Row.RowType)
{// set the title to the head of gridview text
e.Row.Cells [I] .Attributes.Add ( "title", e.Row.Cells [I] .Text);
}

}
}

Guess you like

Origin www.cnblogs.com/xqfk/p/11139582.html