This is a migrated thread and some comments may be shown as answers.

RadNumericTextBox changes on mouseover

1 Answer 86 Views
Input
This is a migrated thread and some comments may be shown as answers.
Drammy
Top achievements
Rank 1
Drammy asked on 15 Aug 2009, 11:55 PM
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...

                        ResultsRadNumericTextBox = new RadNumericTextBox(); 
                        ResultsRadNumericTextBox.Type = NumericType.Number; 
                        ResultsRadNumericTextBox.ID = "EntrantHoleResult" + EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"].ToString(); 
                        ResultsRadNumericTextBox.Text = EntrantsResultsData.Table.Rows[DataIndex]["Score"].ToString(); 
 
                        if (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) < HoleCount) 
                        { 
                            TargetControl = "ctl00_Content_EntrantResultsEntry1_EntrantHoleResult" + (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 1).ToString() + "_text"
                        } 
                        else 
                        { 
                            TargetControl = btnAddEntrantsScores.ClientID; 
                        } 
 
                        ResultsRadNumericTextBox.TabIndex = (Int16)(Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 100); 
                        ResultsRadNumericTextBox.Attributes["onKeyUp"] = "return SendTab('" + TargetControl + "', this, event);"
                        ClientIds[DataIndex] = ResultsRadNumericTextBox.ClientID; 
                        ResultsRadNumericTextBox.Width = 14; 
                        ResultsRadNumericTextBox.MinValue = 1; 
                        ResultsRadNumericTextBox.MaxValue = 19; 
                        ResultsRadNumericTextBox.MaxLength = 2; 
                        ResultsRadNumericTextBox.NumberFormat.DecimalDigits = 0; 
                        ResultsRadNumericTextBox.CssClass = EntryNumericTextBoxCellCssClass; 
                        ResultsRadNumericTextBox.ShowSpinButtons = false
                        ResultsCell.Text = ResultsRadNumericTextBox.ClientID; 
 
                        ResultsCell.Controls.Add(ResultsRadNumericTextBox); 
                        ResultsRow.Cells.Add(ResultsCell); 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Aug 2009, 11:23 AM
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.
Tags
Input
Asked by
Drammy
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or