We finally got our telerik.dll's updated to the current version and the DropDownAutoWidth works perfect for a standard radComboBox. If you create a multi-column (2 columns) radComboBox the DropDownAutoWidth has a very strange behavior. You can see in multi_1.jpg that the second column is not left justified and extends to the left (first time I click the dropdown). In multi_2.jpg, the second column is working its way towards the right and drop down is getting wider (second time I click the dropdown). In multi_3.jpg, the second column is left justified with the other rows and the drop down is even wider (third time I click the dropdown). I have tried this with several of the skins and they all behave the same way. This is my aspx code for the drop down.
Page_Load
This is the code to load the combo box:
<telerik:RadComboBox ID="radCBOMulti" runat="server" MarkFirstMatch="true" AllowCustomText="false" Width="150px" MaxHeight="300px" NoWrap="true" HighlightTemplatedItems="true" ExpandDirection="Down" ExpandDelay="0" CollapseDelay="0" DropDownAutoWidth="Enabled"> <HeaderTemplate> <table style="width: 100%; text-align: left; font-size: 8pt"> <tr> <td style="width: 20%;"> Code </td> <td style="width: 80%;"> Description </td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="width: 100%; text-align: left; font-size: 8pt"> <tr> <td style="width: 20%;"> <%#DataBinder.Eval(Container.DataItem, "Master_Type_Code")%> </td> <td style="width: 80%;"> <%#DataBinder.Eval(Container.DataItem, "Master_Desc")%> </td> </tr> </table> </ItemTemplate></telerik:RadComboBox>Page_Load
radCBOMulti.DataSource = LoadRadTemplate()radCBOMulti.DataBind()This is the code to load the combo box:
Private Function LoadRadTemplate() As DataTable Dim dtTemp As New DataTable Dim drTemp As DataRow Dim dcCol1 As New DataColumn("Master_Type_Code", GetType(System.String)) Dim dcCol2 As New DataColumn("Master_Desc", GetType(System.String)) dtTemp.Columns.Add(dcCol1.ColumnName, dcCol1.DataType) dtTemp.Columns.Add(dcCol2.ColumnName, dcCol1.DataType) drTemp = dtTemp.NewRow drTemp.Item(0) = "" drTemp.Item(1) = "" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "BR" drTemp.Item(1) = "Bedrest BRP" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "CA" drTemp.Item(1) = "Cane Required" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "CB" drTemp.Item(1) = "Complete Bedrest" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "CR" drTemp.Item(1) = "Crutches Required" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "EP" drTemp.Item(1) = "Exercises Prescribed - this is a very long description of this service" dtTemp.Rows.Add(drTemp) drTemp = dtTemp.NewRow drTemp.Item(0) = "IH" drTemp.Item(1) = "Independent at Home" dtTemp.Rows.Add(drTemp) Session("radComboData") = dtTemp Return dtTempEnd FunctionPrivate Sub radCBOMulti_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles radCBOMulti.ItemDataBound Try e.Item.Text = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString.Trim Catch objEx As Exception End TryEnd Sub