G
Guest
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();
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();