How can I change the column width in a gridview filled with a dataset? I
can't get TableStyle to work. Has anyone any sample code, please?
Thanks,
Helen
PS. I am creating a web page in ASP.Net 2.0 using C#.
This is my code so far:
SqlConnection cn; // Connection to the SQL database
SqlDataAdapter da;
DataSet ds;
cn = new SqlConnection();
da=new SqlDataAdapter("Select * From Patient",cn);
ds = new DataSet();
OpenConnection(cn); // Connects to the database
da.Fill(ds,"PatientTable");
dgPatients.DataSource = ds.Tables["PatientTable"];
dgPatients.DataBind();
cn.Close();
Ben Voigt - 12 Feb 2007 20:46 GMT
> How can I change the column width in a gridview filled with a dataset? I
> can't get TableStyle to work. Has anyone any sample code, please?
[quoted text clipped - 3 lines]
>
> PS. I am creating a web page in ASP.Net 2.0 using C#.
Thus your question belongs in the ASP.NET group, and possibly the C# group,
but this is the Visual C++ group.
> This is my code so far:
>
[quoted text clipped - 11 lines]
> dgPatients.DataBind();
> cn.Close();