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

Problems with RADMaskedTextbox with ViewState Turned Off

5 Answers 65 Views
Input
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 16 Feb 2010, 05:06 PM

I have a simple RadMaskedTextBox on a page.

When the page is posted back I want to view the text, and am using the TextWithPromptAndLiterals property and just displaying the contents back to the page. This works fine with all variations of input in the field ie. (12x3.4, _2x3_, 1_x_4)

However when the page that the control is on is modified to turn of the viewstate (enableViewState = “False”), the control no longer works.

Values entered as 12x34 work, however values such as 1_x_4, come back as just “1” (loses the four).

I am using the 2009.3.1314.20 version.

5 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 19 Feb 2010, 03:42 PM
Hello David,

The RadMaskedTextBox rely on having the ViewState enabled to perform essential operations. Almost all properties of the control keep their values into the ViewState. So I suggest you to enable the ViewState if you want to get correctly the value from the TextWithPromptAndLiterals property .

Unless the ViewState is not causing any tangible performance problems, you should not be looking for ways to disable it. Additionally, the following post contains additional information on different optimization techniques for the controls suite.

Also we have a lot of optimization techniques for RadControls and I am sure some of them will be of great help for your project. You could find more information in the following forum post:

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/page-download-size-optimization.aspx

I hope this helps.

Greetings,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
David
Top achievements
Rank 1
answered on 19 Feb 2010, 05:20 PM
It turns out that ViewState is irrelevant.

I have a simple RadMaskedTextBox on a page:

<telerik:RadMaskedTextBox ID="txt" runat="server" Width="200px" 
    Label="Static Mask Question"   
    HideOnBlur="true" 
    Mask="##x##" 
    PromptChar="_"      
/> 

If in the page load method I try to set either the Text or TextWithLiterals to the value ‘1_x_4’, the control loses the last character and only displays ‘1_x__’.  The scenario that makes doing this necessary is that I need to be able to capature exactly what was entered in each position of the mask and that it is possible to not enter a value in every position of the mask.

 

I have debugged into the Telerik code and believe that the problem exists in the SetValue method of the DigitMaskPart. When this method is called, it will only accept a digit thru the regular expression. I believe the regular expression needs to be modified to accept either a digit or the prompt character.

 

I am using the 2009.3.1314.20 version but have verified the same behavior in the 2008.3.1314.20.
0
Accepted
Radoslav
Telerik team
answered on 24 Feb 2010, 03:42 PM
Hi David,

Indeed, I verified that the issue exists in the current version of the controls. We have assigned a higher priority to it and we will do our best to address it in the official Q1 2010 version of RadControls for ASP.NET AJAX .

Best wishes,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kevin
Top achievements
Rank 2
answered on 01 Feb 2011, 10:56 PM
I am using v.2010.3.1317.40 and this is still an issue. When is a fix for this expected?
0
Radoslav
Telerik team
answered on 04 Feb 2011, 10:55 AM
Hello Kevin,

Unfortunately the fix for this issue was reverted and into the current version when you set digits mask and try assigning value which does not mach the mask the value is stripped. It seems that this issue is rather complex and it will take some more time to be investigated and if is possible to be fixed. I will forward it again to our development department to be considered further.

Best wishes,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Input
Asked by
David
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
David
Top achievements
Rank 1
Kevin
Top achievements
Rank 2
Share this question
or