We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeViewAdv label length

Is there a way to limit the number of character the user may type for a label? I know that I can check the text length in the NodeEditorValidating handler, and give an error message if it is too long, but it would be even better if there is a property that would make the editor refuse to take more than a given number of characters.

6 Replies

AD Administrator Syncfusion Team June 23, 2005 03:49 PM UTC

Hi Kjetil, Please take a look at NodeEditorValidateString. I believe it is the event you''re looking for. Regards, Gregory Austin Syncfusion Inc.

AD Administrator Syncfusion Team July 27, 2005 09:39 AM UTC

Since this event is raised for each character entered, I am able to detect when the text gets to long. However, I can''t figure out how to stop the user from entering more characters. The event has two properties: Cancel and ContinueEditing. I have tried all combinations of these, but this doesn''t seem to have any effect. What am I missing here?

VS Vijayanand S Syncfusion Team July 27, 2005 02:26 PM UTC

Hi Kjetil, Please take a look at this sample.I have implemented your requirement with the NodeEditorValidateString event and it would not allow more than 8 characters. I hope this sample will fulfill your request. Please let me know if you have any questions regarding this sample. Thanks Vijay EditorValidating_2484.zip

AD Administrator Syncfusion Team July 27, 2005 05:28 PM UTC

Hi Vijay. This was what I tried which did not work for me. Maybe we are using different versions. I''m using version I belive you must be using another (newer?) version since when I tried to compile your sample the compiler complained that the following properties did not exist treeNodeAdv13.LeftImagePadding = 0; treeNodeAdv13.LeftStateImagePadding = 0; treeNodeAdv13.RightImagePadding = 0; treeNodeAdv13.RightStateImagePadding = 0; After I removed all references to these, I could compile the sample, but then I could still enter more than 8 characters. Is there an other solution that may work for my version? Kjetil

VS Vijayanand S Syncfusion Team July 28, 2005 02:52 PM UTC

Hi Kjetil, Yes, I am currently using our latest internal build – v3.3 which contains the necessary fixes here. If you wish to receive this build, please create a Direct-Trac incident in this regard and mention the link to this forum post. I will then update you with the download information for the same. We appreciate your cooperation on this matter. Thanks Vijay

AD Administrator Syncfusion Team July 28, 2005 03:59 PM UTC

Thanks for your help. However, I don''t think I will install the internal build. I am using many of Syncfusion products and can''t take the chance that this will break something else.

Live Chat Icon For mobile
Up arrow icon