RadNumericTextBox changes on mouseover

2 posts, 0 answers
  1. Drammy
    Drammy avatar
    38 posts
    Member since:
    Feb 2008

    Posted 15 Aug 2009 Link to this post

    Hi,

    I am programmatically creating some RadNumericTextBoxes (see code below).

    I have 2 questions:

    1,When the page is rendered the boxes appear and all looks fine, however when I mouse over any of the boxes they change size slightly (they reduce by about 4px) and remain that size.  This is a bit weird and unsightly.  Is there anything I can do to prevent this?

    2, How can I get the fully qualified ClientID programmatically at creation?  I find that ClientId just contains the Controls ID...

    1                         ResultsRadNumericTextBox = new RadNumericTextBox(); 
    2                         ResultsRadNumericTextBox.Type = NumericType.Number; 
    3                         ResultsRadNumericTextBox.ID = "EntrantHoleResult" + EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"].ToString(); 
    4                         ResultsRadNumericTextBox.Text = EntrantsResultsData.Table.Rows[DataIndex]["Score"].ToString(); 
    5  
    6                         if (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) < HoleCount) 
    7                         { 
    8                             TargetControl = "ctl00_Content_EntrantResultsEntry1_EntrantHoleResult" + (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 1).ToString() + "_text"
    9                         } 
    10                         else 
    11                         { 
    12                             TargetControl = btnAddEntrantsScores.ClientID; 
    13                         } 
    14  
    15                         ResultsRadNumericTextBox.TabIndex = (Int16)(Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 100); 
    16                         ResultsRadNumericTextBox.Attributes["onKeyUp"] = "return SendTab('" + TargetControl + "', this, event);"
    17                         ClientIds[DataIndex] = ResultsRadNumericTextBox.ClientID; 
    18                         ResultsRadNumericTextBox.Width = 14; 
    19                         ResultsRadNumericTextBox.MinValue = 1; 
    20                         ResultsRadNumericTextBox.MaxValue = 19; 
    21                         ResultsRadNumericTextBox.MaxLength = 2; 
    22                         ResultsRadNumericTextBox.NumberFormat.DecimalDigits = 0; 
    23                         ResultsRadNumericTextBox.CssClass = EntryNumericTextBoxCellCssClass; 
    24                         ResultsRadNumericTextBox.ShowSpinButtons = false
    25                         ResultsCell.Text = ResultsRadNumericTextBox.ClientID; 
    26  
    27                         ResultsCell.Controls.Add(ResultsRadNumericTextBox); 
    28                         ResultsRow.Cells.Add(ResultsCell); 
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 19 Aug 2009 Link to this post

    Hi KevReid,

    Try setting the width of the RadNumericTextBox in pixels as shown below and check if the problem
    persists:

    ResultsRadNumericTextBox.Width = Unit.Pixel(14); 

    Regarding your second request, I suggest you to review the following articles for more information on RadInput client-side API and how you can use it:

    http://www.telerik.com/help/aspnet-ajax/input_clientsidebasics.html
    http://www.telerik.com/help/aspnet-ajax/input_clientsideradnumerictextbox.html
    http://demos.telerik.com/aspnet-ajax/input/examples/programming/clientside/apievents/defaultcs.aspx

    Kind regards,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top