Dynamic RadTextBox issue when enter text

3 posts, 1 answers
  1. Harry
    Harry avatar
    27 posts
    Member since:
    Mar 2009

    Posted 18 Nov 2009 Link to this post

    hello...
    i m using dynamic Rad text box...

    protected void Page_Init(object sender, EventArgs e)

    {

    for (Int32 j = 0; j < 2; j++)

    {

    TableRow tr = new TableRow();

    for (Int32 i = 0; i < 2; i++)

    {

    HimaniTextBox txtbox = new HimaniTextBox();

    txtbox.ID = "TextBox" + i;

    txtbox.CssClass = "txtstyle1";

    TableCell tc = new TableCell();

    tc.Style.Add("Width", "50%");

    tc.Controls.Add(txtbox);

    tr.Controls.Add(tc);

    }

    Table1.Controls.Add(tr);

    }

    }
    STYLE SHEET Is

     

    .txtstyle1

     

     

    {

    width:99% !important;

    }
    when i enter  text in this textbox its  size increase according enter text...
    for clear vision plz see  attached file

  2. Answer
    Dimo
    Admin
    Dimo avatar
    8485 posts

    Posted 18 Nov 2009 Link to this post

    Hello Harry,

    Please don't set percentage RadTextBox widths like that. Use the control's property and the issue will not occur.

    In addition, it is recommended to set a table-layout:fixed CSS style to the table in your case. This is because the RadTextBoxes recalculate their width on the client and as a result, the parent <table> may expand unexpectedly.

    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Harry
    Harry avatar
    27 posts
    Member since:
    Mar 2009

    Posted 20 Nov 2009 Link to this post

    Thanks alot
Back to Top