On Oct 29, 9:26*am, deostroll <deostr...@discussions.microsoft.com>
wrote:
> I was trying to email the gridview's content, but while trying to render the
> control's html using the textwriter I got an error. The workaround I found to
> this was instantiate another (2nd) gridview, and bind that separately. I
> don't need to start explicit database connections to fetch the data; I can
> use the 1st gridview as my source (iterating thru its rows and populatinga
> datatable)...Now is there a possibility where I can clone its look and feel
> so that when my 2nd gridview renders it renders will the styles I see offmy
> web page?
>
> --deostroll
I think the easiest way is to use css and apply the same cssclass to
both grids
GridView2.CssClass = GridView1.CssClass
otherwise you would probably need to set each property
GridView2.GridLines = GridView1.GridLines
GridView2.BorderStyle = GridView1.GridLines
GridView2.BorderColor = GridView1.BorderStyle
|