Hi,
I want to restrict the user to enter maximum of 4 alphabets in subjects field, and i also want to control the display size of the subject field.
Can u please guide me how to perform these activities. Your quick response will be greatly appreciated.
Thanks & Regards,
Sher
I want to restrict the user to enter maximum of 4 alphabets in subjects field, and i also want to control the display size of the subject field.
Can u please guide me how to perform these activities. Your quick response will be greatly appreciated.
Thanks & Regards,
Sher
4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 16 Mar 2011, 02:21 PM
Hello Sher,
You can try accessing the subjectTextBox in the FormCreated event like this.
C#:
Clientside:
Thanks,
Shinu.
You can try accessing the subjectTextBox in the FormCreated event like this.
C#:
protected
void
RadScheduler1_FormCreated(
object
sender, SchedulerFormCreatedEventArgs e)
{
TextBox subject = e.Container.FindControl(
"SubjectTextBox"
)
as
TextBox;
subject.Attributes.Add(
"onkeypress"
,
"OnKeyPress"
);
//attatching keypress evnet
}
function
OnKeyPress()
{
//your code here
}
Thanks,
Shinu.
0

Sher
Top achievements
Rank 2
answered on 17 Mar 2011, 01:56 PM
Hi,
Thanks for the reply, i really appreciate that but it is not working for me, it is throwing an exception, i am posting the snapshot od the excaption as an attachment.
Thanks and Regards,
Sher
Thanks for the reply, i really appreciate that but it is not working for me, it is throwing an exception, i am posting the snapshot od the excaption as an attachment.
Thanks and Regards,
Sher
0
Accepted
Hello Sher,
As an another solution you can find the Subject RadTextBox in the Advanced Form and set the MaxLength property to "4". That way you are not allowed to enter more than 4 characters in the subject textbox:
Greetings,
Veronica Milcheva
the Telerik team
As an another solution you can find the Subject RadTextBox in the Advanced Form and set the MaxLength property to "4". That way you are not allowed to enter more than 4 characters in the subject textbox:
protected
void
RadScheduler1_FormCreated(
object
sender, SchedulerFormCreatedEventArgs e)
{
if
((e.Container.Mode == SchedulerFormMode.AdvancedEdit)||(e.Container.Mode == SchedulerFormMode.AdvancedInsert))
{
RadTextBox subject = e.Container.FindControl(
"Subject"
)
as
RadTextBox;
subject.MaxLength = 4;
}
}
Greetings,
Veronica Milcheva
the Telerik team
0

Sher
Top achievements
Rank 2
answered on 18 Mar 2011, 07:22 AM
Thanks very much veronica, it was really helpful,
Thanks and regards,
Sher
Thanks and regards,
Sher