R
Russ
I'm trying to figure out how to cause the items in a DropDownList to
be right justified. This is a dynamically created list. Here is what
I have tried:
DropDownList List = new DropDownList ();
List.Style.Add ("Position", "Absolute");
List.Style.Add ("Left", "10px");
List.Style.Add ("Top", "320px");
List.Style.Add ("text-align", "right");
This does not work. I found some info that there is a bug in the
framework that causes this failure and to use the following instead:
List.DataSource = TextArray;
DedList.DataBind ();
foreach (ListItem item in List.Items)
{
item.Attributes.Add ("style", "text-align:right");
}
This does not work either. Can anyone tell me what to do?
Thanks, Russ
be right justified. This is a dynamically created list. Here is what
I have tried:
DropDownList List = new DropDownList ();
List.Style.Add ("Position", "Absolute");
List.Style.Add ("Left", "10px");
List.Style.Add ("Top", "320px");
List.Style.Add ("text-align", "right");
This does not work. I found some info that there is a bug in the
framework that causes this failure and to use the following instead:
List.DataSource = TextArray;
DedList.DataBind ();
foreach (ListItem item in List.Items)
{
item.Attributes.Add ("style", "text-align:right");
}
This does not work either. Can anyone tell me what to do?
Thanks, Russ