or
I'm trying to access the AdvancedEditForm save button to disable in a certain case and looking at AdvancedForm.ascx, I should be able to get to it by using:
protected
void
RadScheduler1_FormCreated(
object
sender, SchedulerFormCreatedEventArgs e)
{
if
(e.Container.Mode == SchedulerFormMode.AdvancedInsert)
{
((LinkButton)((Panel)e.Container.FindControl(
"ButtonsPanel"
)).FindControl(
"UpdateButton"
)).Enabled =
false
;
}
}
Unfortunately the program throws an "Object reference not set to an instance of an object." when it runs into that line of code. How can I access the save button? Please note I need to do it in the FormCreated event because I need to know the SchedulerFormMode value.
Also, how would I access the room and user resource dropdowns?
Thanks,
Matt
How can I add a confirmation message "Please confirm that you want to proceed with the selected value. Click OK to proceed." when rb1 value is changed? If user clicks OK then it should execute rb1_SelectedIndexChanged, otherwise it should not.
<
asp:RadioButtonList
ID
=
"rb1"
runat
=
"server"
OnSelectedIndexChanged
=
"rb1_SelectedIndexChanged"
AutoPostBack
=
"true"
>
<
asp:ListItem
Value
=
"1"
>1</
asp:ListItem
>
<
asp:ListItem
Value
=
"0"
>0</
asp:ListItem
>
</
asp:RadioButtonList
>
code behind:
protected void rb1_SelectedIndexChanged(Object sender, EventArgs e)
{
--call a stored procedure to update the database with the newly selected rb1.Value
}
.RadRotator .rrRelativeWrapper {
overflow: hidden;
}
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="dock.aspx.vb" Inherits="TestaTredjepartWeb.dock" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"s"
runat
=
"server"
ScriptMode
=
"Debug"
>
</
asp:ScriptManager
>
<
telerik:RadDockZone
runat
=
"server"
ID
=
"dz"
RenderMode
=
"Lightweight"
>
<
telerik:RadDock
runat
=
"server"
ID
=
"RadDock2"
RenderMode
=
"Lightweight"
>
<
ContentTemplate
>
<
asp:Button
ID
=
"btn"
runat
=
"server"
Text
=
"Click me"
OnClientClick
=
"var divExpand = $get('divExpand'); if(divExpand.style.display=='none') divExpand.style.display='block'; else divExpand.style.display='none'; return false;"
/>
<
div
id
=
"divExpand"
style
=
"display: none"
>
Expanded
</
div
>
</
ContentTemplate
>
</
telerik:RadDock
>
</
telerik:RadDockZone
>
</
div
>
</
form
>
</
body
>
</
html
>