VB/ASP Datagrid - Freeze First Row

Is it possible to freeze the first row (plz note this is not the table header as I am not using the table header property) of a datagrid.

I had been given this code which I was told would solve the problem, though I am not sure how and where to insert the code, what event statement it should be placed under.

--------------------------

.Freezing
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}

int index=0;

foreach (GridViewRow tt in GridView1.Rows)
{ if(index==0) tt.CssClass="Freezing"

index++}

--------------------------

Any ideas if this could and how it would work

Or better, an actual why of freezing the first row

thanks



Answer this question

VB/ASP Datagrid - Freeze First Row