Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Telerik
Build great .NET business apps
Net Web
Cross-Platform
Desktop
Reporting and Documents
Testing & Mocking
Debugging
Build JavaScript UI
Javascript
AI for Developers & IT
Ensure AI program success
AI Coding
Additional Tools
Enhance the developer and designer experience
UI/UX Tools
Free Tools
CMS
Support and Learning
Productivity and Design Tools
Hi,
Do you have an TextBoxEditor with masked input in RadPropertyGrid? Is there an example for do it?
Thank you!
class
PropertyGridMaskedEditBoxEditor : BaseInputEditor
{
public
override
object
Value
get
var element = ((RadMaskedEditBoxElement)
this
.EditorElement);
return
element.Value;
}
set
element.Value = value;
void
BeginEdit()
base
.BeginEdit();
.EditorElement.Focus();
((RadMaskedEditBoxElement)
.EditorElement).ValueChanged +=
new
EventHandler(TrackBarEditor_ValueChanged);
TrackBarEditor_ValueChanged(
sender, EventArgs e)
.OnValueChanged();
bool
EndEdit()
.EditorElement).ValueChanged -= TrackBarEditor_ValueChanged;
.EndEdit();
protected
RadElement CreateEditorElement()
RadMaskedEditBoxElement() { MaskType = MaskType.None };
Type DataType
typeof
(
string
); }
private
RadPropertyGrid1_EditorInitialized(
sender, PropertyGridItemEditorInitializedEventArgs e)
var editor = e.Editor
as
PropertyGridMaskedEditBoxEditor;
if
(editor !=
null
&& e.Item.Name ==
"Phone"
)
var element = editor.EditorElement
RadMaskedEditBoxElement;
element.MaskType = MaskType.Standard;
element.Mask =
"(000) 000-000"
;
RadPropertyGrid1_EditorRequired(
sender, Telerik.WinControls.UI.PropertyGridEditorRequiredEventArgs e)
(e.EditorType ==
(PropertyGridTextBoxEditor))
e.EditorType =
(PropertyGridMaskedEditBoxEditor);