T
tshad
I have dropdowns that I am filling then adding a line " --All--" to the
first item.
I am trying to get it closer to the center (would be nice to be able to
center it).
public void GetClientNames()
{
SqlCommand dbCommand;
dbCommand = new SqlCommand("GetClientName",
new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectString"].ConnectionString));
dbCommand.CommandType = CommandType.StoredProcedure;
dbCommand.Connection.Open();
ddlClient.DataSource =
dbCommand.ExecuteReader(CommandBehavior.CloseConnection);
ddlClient.DataTextField = "ClientName";
ddlClient.DataValueField = "ClientId";
ddlClient.DataBind();
ddlClient.Items.Insert(0, " --All--");
}
Why does it still move "--All--" to the left? I assume it takes out leading
blanks.
Is there a way (other then putting in a whole bunch of " " in front of
them) to move the text a little to the right or center it? Only the first
item not all the items.
Thanks,
Tom
first item.
I am trying to get it closer to the center (would be nice to be able to
center it).
public void GetClientNames()
{
SqlCommand dbCommand;
dbCommand = new SqlCommand("GetClientName",
new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectString"].ConnectionString));
dbCommand.CommandType = CommandType.StoredProcedure;
dbCommand.Connection.Open();
ddlClient.DataSource =
dbCommand.ExecuteReader(CommandBehavior.CloseConnection);
ddlClient.DataTextField = "ClientName";
ddlClient.DataValueField = "ClientId";
ddlClient.DataBind();
ddlClient.Items.Insert(0, " --All--");
}
Why does it still move "--All--" to the left? I assume it takes out leading
blanks.
Is there a way (other then putting in a whole bunch of " " in front of
them) to move the text a little to the right or center it? Only the first
item not all the items.
Thanks,
Tom