Declined
Last Updated: 20 Jun 2022 15:02 by ADMIN
ADMIN
Danail Vasilev
Created on: 06 Oct 2015 06:54
Category: FormDecorator
Type: Bug Report
0
Fix width of decorated selects
For the time being you can manually increase the width of the decorated select:
ASPX:
		<script>
			function pageLoad() {
				increaseWidth($telerik.$('.rfdSelect'), 68);
			}
			function increaseWidth(element, increase) {
				element.css('width', parseInt(element.css('width').replace('px', '')) + increase + 'px');
			}
		</script>
<telerik:RadFormDecorator ID="decor" runat="server" DecoratedControls="All" Skin="BlackMetroTouch"  />
<asp:DropDownList ID="ddlASPNET" runat="server"></asp:DropDownList>
C#:
		protected void Page_Load(object sender, EventArgs e)
		{
			var dt = Getdata();

			ddlASPNET.DataSource = dt;
			ddlASPNET.DataTextField = "Name";
			ddlASPNET.DataValueField = "ID";
			ddlASPNET.DataBind();
		}

		private DataTable Getdata()
		{
			DataTable dt = new DataTable();
			dt.Columns.Add("ID");
			dt.Columns.Add("Name");

			for (int i = 1; i <= 100; i++)
			{
				DataRow dr = dt.NewRow();
				dr["ID"] = i.ToString();
				if (i % 2 > 0)
					dr["Name"] = string.Format("Test Name # {0}", i);
				else
					dr["Name"] = string.Format("aaaaaaaaaaaaaa bbbbbbbbbbbbbTest Name Unmodule # {0}", i);

				dt.Rows.Add(dr);
			}
			return dt;

		}
0 comments