or
| <asp:Repeater ID="Repeater1" runat="server" DataSourceID="XmlDataSource1"> |
| <HeaderTemplate> |
| <table> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <tr> |
| <th colspan="2"><asp:Label ID="lblDayOfWeek" runat="server" text='<%# DataBinder.Eval(Container.DataItem,"Value") %>' /><asp:CheckBox ID="chkDayOfWeek" runat="server" OnCheckedChanged="DayOfWeek_Changed" AutoPostBack="true" /></th> |
| </tr> |
| <tr id="trRepeaterTimes" runat="server"> |
| <td>Start Time:<telerik:RadTimePicker ID="RadTimePicker1" runat="server" Skin="Vista" TimeView-Interval="0:30" TimeView-Columns="6" /></td> |
| <td>End Time:<telerik:RadTimePicker ID="RadTimePicker2" runat="server" Skin="Vista" TimeView-Interval="0:30" TimeView-Columns="6" /></td> |
| </tr> |
| </ItemTemplate> |
| <FooterTemplate> |
| </table> |
| </FooterTemplate> |
| </asp:Repeater> |
| protected void DayOfWeek_Changed(object sender, EventArgs e) |
| { |
| foreach (RepeaterItem dataItem in Repeater1.Items) |
| { |
| CheckBox chk = (CheckBox)dataItem.FindControl("chkDayOfWeek"); |
| RadTimePicker rtp1 = (RadTimePicker)dataItem.FindControl("RadTimePicker1"); |
| RadTimePicker rtp2 = (RadTimePicker)dataItem.FindControl("RadTimePicker2"); |
| HtmlTableRow tr = (HtmlTableRow)dataItem.FindControl("trRepeaterTimes"); |
| if (chk.Checked) |
| { |
| tr.Attributes.Add("style", "display:normal;"); |
| rtp1.Visible = true; |
| rtp2.Visible = true; |
| RadAjaxManager1.AjaxSettings.AddAjaxSetting(rtp1, rtp1); |
| } |
| else |
| { |
| tr.Attributes.Add("style", "display:none;"); |
| rtp2.Visible = false; |
| rtp1.Visible = false; |
| } |
| } |
| } |
| ' Name: EnableToolbar |
| ' Purpose: Enables the toolbar. |
| ' Parameters: radEditor - The rad editor. |
| ' strToolbarName - The name of the toolbar to enable. |
| ' Returns: Nothing. |
| Public Shared Sub EnableToolbar(ByRef radEditor As RadEditor, ByVal strToolbarName As String) |
| Dim radEditorToolGroupCollection As EditorToolGroupCollection |
| Dim radEditorToolGroup As EditorToolGroup = Nothing |
| Dim l_bToolbarFound As Boolean = False |
| ' Read the collection of tools. |
| radEditorradEditorToolGroupCollection = radEditor.Tools |
| ' Iterate through the collection. |
| For Each radEditorToolGroup In radEditorToolGroupCollection |
| If (radEditorToolGroup.Tag = strToolbarName) Then |
| ' I have found the toolbar, but how do I enable it? |
| End If |
| Next |
| End Sub |
| <telerik:RadWindowManager |
| id="RadWindowManager1" |
| VisibleOnPageLoad="true" |
| DestroyOnClose="true" |
| ShowContentDuringLoad="false" |
| Skin="Vista" |
| InitialBehaviors="Close,Maximize,Minimize,Move,Resize" |
| MinimizeZoneId="HorizontalMinimize" |
| OnClientShow = "OnClientShowRadWindow" |
| OnClientPageLoad = "OnClientPageLoadRadWindow" |
| OnClientDragStart = "OnClientDragStartRadWindow" |
| OnClientDragEnd = "OnClientDragEndRadWindow" |
| OnClientClose = "OnClientCloseRadWindow" |
| runat="server"> |
| <Windows> |
| <telerik:RadWindow ID="ModalWindow" runat="server" Behavior="None" |
| DestroyOnClose="true" Modal="true" |
| VisibleOnPageLoad="false" /> |
| </Windows> |
| </telerik:RadWindowManager> |
<script type="text/javascript">
function mngRequestStarted(ajaxManager, eventArgs)
{
if(eventArgs.EventTarget == "lnkExcel")
{
eventArgs.EnableAjax = false;
}
}
</script>
This does not have any affect when used within the Master Page. I can actually see a slight movement of the grid so I know Ajax is still working here. After a bit of debugging, I found the if statement never returns true because the control is nested in the Master Page and gets a funky id (thanks ASP.NET).
How do I change the "lnkExcel" part to return the id of the control even when it's on a Master Page?
Thanks.