Infragistics 10.2 .NET 3.5
I'm using a dropdown provider for a column within a webdatagrid. When I expand the drop down list all the item are center aligned. How do I modify the alignment to be left justified??
Thanks for your help!
Hello rcline,
A possible solution is to override the default CSS class in the page
where you are using the WebDropDown provider :
<style type="text/css">
.igdd_DropDownList
{
background-color: White;
font-size: 10pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0px;
padding: 1px;
text-align: right;
}
</style>
Another way to do this is using selectors in our css classes, so they take preference, but it will be much harder to achieve it.
Below there is forum post regarding right alignment of a column for example:
http://forums.infragistics.com/forums/t/37511.aspx
Let me know if you need further questions
Thanks for your help,
I tried your suggestion but the items in the drop down list are still centered. I got it to work with a regular webdropdown but this is a dropdownprovider within a webdatagrid.
I found that if I add text-align: left; to .igdd_Office2007BlueDropDownList in the ig_dropDown.css it works.
.igdd_Office2007BlueDropDownList
text-align: left;
But I don't want to change the css. How do I do this in my aspx page??
Normal 0 false false false EN-IN X-NONE X-NONE
Changing font size inside .igdd_DropDownList do not have any effect.
I can make font bold, change their alignments etc. however changing font size do not have any effect.
Can anyone help me on this?
Thanks,
Siddhanath
Ms. Georgieva,
The items in the drop down are aligned correctly now.
Ron C
Hello Ron,
Thank you for the clarification.
You have to override the igdd_Office2007BlueDropDownList class in the CSS section of the page
<head runat="server">
<title></title>
text-align: left !important;
</head>
......
<EditorControl EnableDropDownAsChild="False" Width="300px" DataSourceID="SqlDataSource2" DropDownContainerWidth="300px" TextField="CategoryName" ValueField="CategoryID"
StyleSetName="Office2007Blue">
<DropDownItemBinding TextField="CategoryName" ValueField="CategoryID" />
<Templates>
<ig:ItemTemplate TemplateID="">
</ig:ItemTemplate>
</Templates>
</EditorControl>
</ig:DropDownProvider>
Let me know if you need further assistance.
Yes, Iam using StyleSetName Office2007Blue.
No, I am not setting any other styles.
Thanks
Are you using a special StyleSetName (for example Office2007Blue)?
Also the default text align of the drop down items is left,
are you setting other style to any parent element of the WebDropDown?