System.IO.StringWriter sw = new System.IO.StringWriter();
foreach (DataTable dt in ds.Tables)
{
GridView grd = new GridView();
grd.DataSource = dt;
grd.Style.Remove("border-collapse");
grd.Attributes.Remove("style");
grd.Attributes.Remove("border");
grd.Attributes.Add("style", "display:none;");
grd.DataBind();
HtmlTextWriter htw = new HtmlTextWriter(sw);
grd.RenderControl(htw);
grd = null;
}
In this above code im passing datatable as source to gridview
when i quick watch on htw it return result as below:-
base {System.IO.TextWriter} = {<div>
<table cellspacing="0" rules="all" border="1" style="border-collapse:collapse;display:none;">
<tr>
<th scope="col">idUsr</th><th scope="col">cdCode</th><th scope="col">idGrp</th><th scope="col">sNamePrefix</th><th scope="col">sNameFirst</th>...
in this by default border attribute and style added to table how could i remove this from table structure?Please Help!