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

Specifying GridViewMaskBoxColumn maximum length when using a "P" Mask

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rebecca
Top achievements
Rank 1
Rebecca asked on 31 Jul 2013, 08:26 PM
I have several columns in a RadGridView control available for editing a percentage value.  The "P" mask works great using a GridViewTextBoxColumn except I can't figure out how to set a limit on the number of digits a user can enter into a cell.  There USED to be a MaxLength property to define the maximum length, but in the recent versions of the Rad Controls, this property has been removed ... no longer available.  Can you tell me how I can maintain the nice formatting that the "P" mask provides (while editing) and still specify the maximum length of the string of digits the user is allowed to enter?

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 05 Aug 2013, 11:53 AM
Hello Rebecca,

Thank you for writing.

I am not really sure if I understood right, but if you are using GridViewTextBoxColumn, there is a MaxLength property there in our latest version 2013 Q2 (724):
GridViewTextBoxColumn col = new GridViewTextBoxColumn("Col" + i);
col.MaxLength = 1;

And, if you are using GridViewMaskBoxColumn, you need to specify the maximum length in the mask. This is so, because it was considered that the priority of the mask should be higher than the MaxLength property.

If you have any other questions or comments, please let me know.
 
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Rebecca
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or