I created the site
http://www.ebhl.org for my morning hockey league. One of the users requested a group email to be added to the roster of each team to make emailing everyone on that team easier. The problem is, that the large size of the email address string makes the grid stretch out and look terrible. I would like to remove the group email from the grid and add it to a button click event. Here is the code that I'm using to fill the datagrid.
private void LoadData(string s)
{
// check s for the team name then laod all the data
OleDbConnection myConn = new OleDbConnection(Session["ConnStr"].ToString());
myConn.Open();
// add the query
string sql = "Select * from TeamRoster where Team = '" + s + "'";
// create the command object
OleDbCommand myCommand = new OleDbCommand(sql,myConn);
// create an object to handle the return
OleDbDataReader Result = myCommand.ExecuteReader();
DataGrid1.DataSource = Result;
DataGrid1.Width = 600;
DataGrid1.DataBind();
myConn.Close();
}
Go to the web site, click on "Rosters" and then click on "Kings" to see what I'm referring to.
Can anyone tell me how to fill the grid with all the records except the group email and then set the group email to a variable for a redirect?