Hi,
I'm using dropdown cell in webdatagrid by the following code and bind to datatable and adjust the css style in ig_dropDown.css. Version: 14.1.20141.2392
The issue is how to make the height of the dropdown the same as the list of the content accordingly. I can't insert image. Could you please let me know how to insert image from my local to this thread? Thanks.
The code is as the following:
.igdd_ListItem{ font-size:11px; font-family: Verdana, Arial, Helvetica, sans-serif; border:solid 1px Transparent; padding:1px 1px 1px 1px; list-style-type: none; width: auto; min-height: 11px; height: auto !important; cursor:pointer;}
.aspx:
<EditorProviders> <ig:DropDownProvider ID="REPOSITORYProvider"> <EditorControl ID="REPOSITORYEditorControl" runat="server" DisplayMode="DropDown" TextField="KEY_VALUE" ValueField="KEY_VALUE" Width="120px" /> </ig:DropDownProvider> </EditorProviders>
.aspx.cs:
REPOSITORYProvider.EditorControl.DataSource = dtDepository; REPOSITORYProvider.EditorControl.DataBind();
Hello Bill,
I'm not quite sure I understand what you would like to implement. I agree that an image would help my understanding of this. To add an image, when responding you should see three tabs at the top of the forum: Compose, Options, and Preview. If you switch to the Options tab you will be able to upload a file to attach to the forum post.
Hi Jason,
I uploaded the image, In the image the height of the dropdown box is much bigger than the content in the dropdown list. I'd like to make it the same height as the content and adjustable with the dropdown list content. Please advise.
Thanks,
Bill
Bill,
What you can do is set EditorControl.DropDownContainerHeight to 0. When this property is set to 0 the WebDropDown will have its height grow or shrink based off of the number of items in the list.
<EditorProviders> <ig:DropDownProvider ID="REPOSITORYProvider"> <EditorControl ID="REPOSITORYEditorControl" runat="server" DisplayMode="DropDown" TextField="KEY_VALUE" ValueField="KEY_VALUE" Width="120px" DropDownContainerHeight="0" /> </ig:DropDownProvider> </EditorProviders>
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=Infragistics4.Web.v15.1~Infragistics.Web.UI.ListControls.WebDropDown~DropDownContainerHeight.html
Thanks. That works...