I'd like to override the subject textbox and have a listbox there instead. Do I need to use advancedinserttemplate for this? This is the only input field I want to customize. Do I have to explicitly define every field on the insert form if I do it that way. Are there any decent examples of this?
Thanks,
Dan
Thanks,
Dan
5 Answers, 1 is accepted
0
Hello Dan,
Here is a sample demo project that is showing one way you can input a listbox instead of the subject textbox without a template.
Hope this will be helpful.
Kind regards,
Plamen Zdravkov
the Telerik team
Here is a sample demo project that is showing one way you can input a listbox instead of the subject textbox without a template.
Hope this will be helpful.
Kind regards,
Plamen Zdravkov
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Dan
Top achievements
Rank 1
answered on 16 Aug 2011, 06:44 PM
Thanks Plamen, that would be great. Just having trouble compiling it because it is .Net v4 and I am using vs2008 and it is giving me an error on targetFramework in the web.config
0
Hello Dan,
I removed "targetFramework="4.0"" from the web config code and added the appropriate(3.5) version of our Telerik.Web.UI product and it worked with Visual Studio 2008 at my side.
Hope this will help.
Best wishes,
Plamen Zdravkov
the Telerik team
I removed "targetFramework="4.0"" from the web config code and added the appropriate(3.5) version of our Telerik.Web.UI product and it worked with Visual Studio 2008 at my side.
Hope this will help.
Best wishes,
Plamen Zdravkov
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Dan
Top achievements
Rank 1
answered on 19 Aug 2011, 01:58 PM
Any chance you could zip that up? Made changes but still getting errors... Thanks!
0
Hi Dan,
Here is the project that worked at my side at Visual studio 2008 with tha latest 3.5 version of our product.
In case you still can't run it here is the code that is used:
aspx:
javascript:
code-behind:
Regards,
Plamen Zdravkov
the Telerik team
Here is the project that worked at my side at Visual studio 2008 with tha latest 3.5 version of our product.
In case you still can't run it here is the code that is used:
aspx:
<
script
type
=
"text/javascript"
>
var subjectTextBox;
function OnLoadSubjectTextBox(sender) {
subjectTextBox = sender;
}
function OnClientSelectedIndexChanging(sender, args) {
subjectTextBox.set_value(args.get_item().get_text());
}
</
script
>
javascript:
<
script
type
=
"text/javascript"
>
var subjectTextBox;
function OnLoadSubjectTextBox(sender) {
subjectTextBox = sender;
}
function OnClientSelectedIndexChanging(sender, args) {
subjectTextBox.set_value(args.get_item().get_text());
}
</
script
>
code-behind:
protected
void
RadScheduler1_FormCreated(
object
sender, SchedulerFormCreatedEventArgs e)
{
if
(e.Container.Mode == SchedulerFormMode.AdvancedInsert || e.Container.Mode == SchedulerFormMode.AdvancedEdit)
{
RadListBox lb1 =
new
RadListBox();
lb1.Items.Add(
new
RadListBoxItem(
"a"
));
lb1.Items.Add(
new
RadListBoxItem(
"b"
));
lb1.Items.Add(
new
RadListBoxItem(
"c"
));
lb1.OnClientSelectedIndexChanging =
"OnClientSelectedIndexChanging"
;
RadTextBox subject = e.Container.FindControl(
"Subject"
)
as
RadTextBox;
subject.ClientEvents.OnLoad =
"OnLoadSubjectTextBox"
;
subject.CssClass =
"textbox"
;
subject.Parent.Controls.Add(lb1);
lb1.CssClass =
"listbox"
;
}
}
Regards,
Plamen Zdravkov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>