XtraEditor.SearchControl

patrick

Well-known member
Joined
Dec 5, 2021
Messages
238
Programming Experience
1-3
C#.NET

I am interested whether XtraEditors. SearchControl's input text can be limited to a specific max length and how can this be achieved if it is possible.

What is function name to set??


I need to enter 5000 characters in SearchControl (DevExpress.XtraEditors.SearchControl)

In DevExpress.XtraEditors.SearchControl,,,,, MaxLength ...How do I set MaxLength ?

(DevExpress.XtraEditors.SearchControl) What is the maximum number of characters that can be entered?

Please Help Me. ㅠㅠ

Thanks in advance
 
Last edited by a moderator:
Moving to 3rd party products....
 
Please Help Me.

I am interested whether XtraEditors. SearchControl's input text can be limited to a specific max length and how can this be achieved if it is possible.

What is function name to set??

Please Help Me ㅠㅠ
 
You'll likely get better help by asking DevExpress support rather than asking a random C# programming forum.
 
Do you realistically expect a user to type in a 5000 character search string? That is about 4 type written pages.
 
Last edited:
Do you realistically expect a user to type in a 5000 character search string? That is about 4 type written pages.

Your Answer ) That is about 4 type written pages.
My Question) I don't Understand your answer. Please explain in an easy way. Please Help me
 
You are trying to set the limit of your search box to have a maximum of 5000 characters. To visualize a user typing in 5000 characters, they would have to type in about 4 pages worth of text. Do you realistically expect a user to be typing that much text into a search box?
 
I don't use DevExpress components but I just took a look at the documentation and it appears that SearchControl inherits TextEdit and TextEdit.Properties is type RepositoryItemTextEdit and that type has a MaxLength property. I haven't tested but that looks as though you can set SearchControl.Properties.MaxLength.

I have to agree with @Skydiver though. If you were going to limit the number of characters that the user can enter, a number far smaller than 5000 seems the sensible option.
 
I don't use DevExpress components but I just took a look at the documentation and it appears that SearchControl inherits TextEdit and TextEdit.Properties is type RepositoryItemTextEdit and that type has a MaxLength property. I haven't tested but that looks as though you can set SearchControl.Properties.MaxLength.

I have to agree with @Skydiver though. If you were going to limit the number of characters that the user can enter, a number far smaller than 5000 seems the sensible option.
Thank you very much.
How does Searchcontrol Set Multiline ?

Please help me
 
I don't use DevExpress components but I just took a look at the documentation and it appears that SearchControl inherits TextEdit and TextEdit.Properties is type RepositoryItemTextEdit and that type has a MaxLength property. I haven't tested but that looks as though you can set SearchControl.Properties.MaxLength.

I have to agree with @Skydiver though. If you were going to limit the number of characters that the user can enter, a number far smaller than 5000 seems the sensible option.

Devexpress.XtraEditors.Repository.RepositoryItemTextEdit edit = new Devexpress.XtraEditors.Repository.RepositoryItemTextEdit();
edit.MaxLength = 5000;
this.src.???? = edit;


How should i code the ????? part?
 
Again, I don't use DevExpress components so I can only go by what I read in the documentation - documentation that you can read too - and experience I've had with other WinForms controls. I wouldn't have thought that you would have to create a RepositoryItemTextEdit object yourself but, rather, get an existing one from the Properties property of your SearchControl and modify that. That's why that's what I said to do in my previous post. Assuming that that Properties property is initially null and you do have to create one, the obvious next step is to assign that object you created to the Properties property of your SearchControl.
 
Our OP has fallen back to his old ways of trying to get others to do his thinking and research for him. It's sad because a few months ago he was getting better about doing most of the initial research himself and coming to a specific question.
 
Back
Top Bottom