<telerik:RadGrid ID="grdCollections" runat="server" GridLines="None" AutoGenerateColumns="False" OnInsertCommand="grdCollections_Insert" OnUpdateCommand="grdCollections_Update" OnEditCommand="grdCollections_Command" AllowSorting="True" OnDeleteCommand="grdCollections_Command" OnNeedDataSource="grdCollections_NeedDataSource" OnCancelCommand="grdCollections_Command" OnItemDataBound="grdCollections_ItemDataBound" PageSize="10" > <MasterTableView EditMode="EditForms" CommandItemDisplay="Top" DataKeyNames="CollectionID" InsertItemDisplay="Bottom"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordImageUrl="~/Images/AddRecord.gif" AddNewRecordText="Add New Collection Entry" > </CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="CollectionID" DataType="System.Int32" ReadOnly="true" FilterControlAltText="Filter CollectionID column" HeaderText="ID" SortExpression="CollectionID" UniqueName="CollectionID"> </telerik:GridBoundColumn> <telerik:GridDropDownColumn FilterControlAltText="Filter CreditorID column" UniqueName="CreditorID" DataField="CreditorID" HeaderText="*CreditorID" Visible="true" > </telerik:GridDropDownColumn> <telerik:GridDropDownColumn FilterControlAltText="Filter Name column" UniqueName="Name" DataField="Name" HeaderText="*Agency Name" ListTextField="Name" ListValueField="CreditorID"> </telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="AccountNumber" FilterControlAltText="Filter AccountNumber column" HeaderText="Account No." SortExpression="AccountNumber" UniqueName="AccountNumber"> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn FilterControlAltText="Filter RptdDate column" DataField="RptdDate" DataType="System.DateTime" HeaderText="*Opened Date" SortExpression="RptdDate" UniqueName="RptdDate" DataFormatString="{0:d}"> </telerik:GridDateTimeColumn> <telerik:GridDateTimeColumn DataField="RvsdDate" DataType="System.DateTime" FilterControlAltText="Filter RvsdDate column" HeaderText="Date Revised" SortExpression="RvsdDate" UniqueName="RvsdDate" DataFormatString="{0:d}"> </telerik:GridDateTimeColumn> <telerik:GridDateTimeColumn DataField="LastPmtDate" DataType="System.DateTime" FilterControlAltText="Filter LastPmtDate column" HeaderText="Last Payment Date" SortExpression="LastPmtDate" UniqueName="LastPmtDate" DataFormatString="{0:d}"> </telerik:GridDateTimeColumn> <telerik:GridNumericColumn DataField="Amount" DataType="System.Decimal" FilterControlAltText="Filter Amount column" HeaderText="Amount" SortExpression="Amount" UniqueName="Amount" DataFormatString="{0:C}"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="Balance" DataType="System.Decimal" FilterControlAltText="Filter Balance column" HeaderText="Total Balance" DataFormatString="{0:C}" SortExpression="Balance" UniqueName="Balance"> </telerik:GridNumericColumn> <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn CommandName="Delete" FilterControlAltText="Filter column1 column" Text="Delete" UniqueName="column1"> </telerik:GridButtonColumn> </Columns> <EditFormSettings EditFormType="Template"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> <FormTemplate> <table width="580px"> <tr> <td style="width:19%; text-align:right;"> <asp:Label ID="lblEditAgency" runat="server" Text="*Agency:"></asp:Label> </td> <td style="width:1%;"> </td> <td style="width:80%;"> <telerik:RadComboBox ID="cmbCreditors" runat="server" DataTextField="Name" DataValueField="CreditorID" DropDownWidth="440px" Height="150px" EmptyMessage="Select the name of the collection agency. If the agency is not on the list, click Add New"> <HeaderTemplate> <table style="width: 440px" cellspacing="0" cellpadding="0"> <tr> <td style="width:30px">ID </td> <td style="width:120px">Agency Name </td> <td style="width:140px">Address </td> <td style="width:75px">Phone </td> <td style="width:75px">Fax </td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="width: 440px" cellspacing="0" cellpadding="0"> <tr> <td style="width:30px"><%# DataBinder.Eval(Container.DataItem, "CreditorID")%> </td> <td style="width:120px"><%# DataBinder.Eval(Container.DataItem, "Name")%> </td> <td style="width:140px"><%# DataBinder.Eval(Container.DataItem, "Address")%> </td> <td style="width:75px"><%# DataBinder.Eval(Container.DataItem, "Phone")%> </td> <td style="width:75px"><%# DataBinder.Eval(Container.DataItem, "Fax")%> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox> <asp:Button ID="Button3" Text="Add Agency" runat="server" OnClientClick="radbtnAddAgency(); return false;"> </asp:Button> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label2" runat="server" Text="*Opened Date:"></asp:Label> </td> <td> </td> <td> <telerik:RadDatePicker ID="DtPickerOpenedDate" runat="server"> </telerik:RadDatePicker> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label1" runat="server" Text="*Revised Date:"></asp:Label> </td> <td> </td> <td> <telerik:RadDatePicker ID="DtPickerRevisedDate" runat="server"> </telerik:RadDatePicker> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label4" runat="server" Text="Account Number:"></asp:Label> </td> <td> </td> <td> <telerik:RadTextBox ID="txtAccNumber" runat="server" Width="200px" EmptyMessage="Enter the internal account number if applicable"> </telerik:RadTextBox> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label5" runat="server" Text="Last Payment Date:"></asp:Label> </td> <td> </td> <td> <telerik:RadDatePicker ID="DtPickerLastPaymentDate" runat="server"> </telerik:RadDatePicker> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label6" runat="server" Text="Debt Amount:"></asp:Label> </td> <td> </td> <td> <telerik:RadNumericTextBox ID="txtDebtAmount" runat="server" Width="70px" Type="Currency" EmptyMessage="Click here to enter amount"> </telerik:RadNumericTextBox> </td> </tr> <tr> <td style="text-align:right;"> <asp:Label ID="Label7" runat="server" Text="Total Balance:"></asp:Label> </td> <td> </td> <td> <telerik:RadNumericTextBox ID="txtTotalBalance" runat="server" Width="70px" Type="Currency" EmptyMessage="Click here to enter amount"> </telerik:RadNumericTextBox> </td> </tr> <tr> <td colspan="3"> <asp:Button ID="btnSave" Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Insert" : "Update" %>' runat="server" CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'> </asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"> </asp:Button> </td> </tr> </table> </FormTemplate> </EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu> <ClientSettings> <ClientEvents OnCommand="RaiseCommand" /> </ClientSettings><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> </telerik:RadGrid>protected void grdCollections_Insert(object sender, GridCommandEventArgs e) { GridEditFormInsertItem insItem = e.Item as GridEditFormInsertItem; //GridEditableItem editItem = e.Item.OwnerTableView.GetInsertItem(); int AgentId = 0; RadComboBox cmb = insItem.FindControl("cmbCreditors") as RadComboBox;//cmb shows null if ((cmb != null) && (cmb.DataSource != null)) { AgentId = Convert.ToInt32(cmb.SelectedValue); }//txtAmt shows null RadTextBox txtAmt = insItem.FindControl("txtDebtAmount") as RadTextBox;} protected void grdCollections_Update(object sender, GridCommandEventArgs e) { GridEditableItem editedItem = e.Item as GridEditableItem; int AgentId = 0; RadComboBox cmb = editedItem.FindControl("cmbCreditors") as RadComboBox;//cmb shows null if ((cmb != null) && (cmb.DataSource != null)) { AgentId = Convert.ToInt32(cmb.SelectedValue); }//txtAmt shows null RadTextBox txtAmt = editedItem.FindControl("txtDebtAmount") as RadTextBox; }
<div id="editor" class="input"> <telerik:RadEditor ID="txtText" runat="server" Height="200px" Width="400px" ToolTip="Enter a body" EnableEmbeddedSkins="false"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="Bold" /> <telerik:EditorTool Name="Italic" /> <telerik:EditorTool Name="Underline" /> <telerik:EditorTool Name="Cut" /> <telerik:EditorTool Name="Copy" /> <telerik:EditorTool Name="Paste" /> <telerik:EditorTool Name="FontName" /> <telerik:EditorTool Name="FontSize" /> <telerik:EditorTool Name="ForeColor" /> <telerik:EditorTool Name="InsertUnorderedList" /> <telerik:EditorTool Name="Bold" /> </telerik:EditorToolGroup> </Tools> <Content> </Content> </telerik:RadEditor> </div>
if (!IsPostBack) { EditorToolGroup main = new EditorToolGroup(); txtText.Tools.Add(main); EditorTool InsertUnorderedList = new EditorTool(); InsertUnorderedList.Name = "InsertUnorderedList"; main.Tools.Add(InsertUnorderedList); }
We want to be able to add it in the ascx markup.


I have 5 tabs and each one load a web user control. I used RadTabStrip and RadMultiPage controls. my problem is that RadAjaxLoadingPanel only works in the first click but when I click for second time in any tab, this does not work. How can I show the loading image each time the user clicks a tab and needs to wait for being loading the user control?
<%
--<telerik:RadScriptManager ID="ScriptManager1" runat="server" />--%>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rtsBooks">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rmpTreeviews" LoadingPanelID="ralpnlProgress"/>
<telerik:AjaxUpdatedControl ControlID="rtsBooks" LoadingPanelID="ralpnlProgress"/>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="rmpTreeviews">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rmpTreeviews" LoadingPanelID="ralpnlProgress"/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<
telerik:RadAjaxLoadingPanel ID="ralpnlProgress" runat="server" Transparency="20">
<img alt="Loading..." src="/_layouts/NIAMS.UCTreeview/Images/loading.gif"/>
</
telerik:RadAjaxLoadingPanel>
<%
--OnTabClick="RadTabStrip1_TabClick" --%>
<telerik:RadTabStrip ID="rtsBooks" runat="server" Skin="" OnTabClick="rtsBooks_TabClick"
MultiPageID="rmpTreeviews" Width="100%" Height="25" >
<Tabs>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/HomeButton.png">
</telerik:RadTab>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/WhiteButton.png">
</telerik:RadTab>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/RedButton.png">
</telerik:RadTab>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/BlueButton.png">
</telerik:RadTab>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/YellowButton.png">
</telerik:RadTab>
<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/GreenButton.png">
</telerik:RadTab>
</Tabs>
</
telerik:RadTabStrip>
<
div id="rightMenu" style="text-align: right; width: 950px;">
<div><asp:HyperLink ID="lnkPrint" Width="900" runat="server" NavigateUrl="~/projects/bb/WebPartPage/FullTableOfContentsBB.aspx" Target="_blank">Preview Full E-Briefing Book Table of Contents</asp:HyperLink></div>
</
div>
<telerik:RadMultiPage ID="rmpTreeviews" runat="server" SelectedIndex="0" CssClass="multiPage" RenderSelectedPageOnly="True">
<telerik:RadPageView ID="rdvHome" runat="server" width="980px">
<div class="HomeBoxHeader"></div>
<div style="padding-left:20px;">
<uc2:UCHome ID="UCHome1" runat="server" />
</div>
</telerik:RadPageView>
<telerik:RadPageView ID="rpvWhite" runat="server" width="998px">
<div class="WhiteBoxHeader"></div>
<asp:PlaceHolder ID="phWhite" runat="server"></asp:PlaceHolder>
</telerik:RadPageView>
<telerik:RadPageView ID="rpvRed" runat="server" width="998px">
<div class="RedBoxHeader"></div>
<asp:PlaceHolder ID="phRed" runat="server"></asp:PlaceHolder>
</telerik:RadPageView>
<telerik:RadPageView ID="rpvBlue" runat="server" width="998px">
<div class="BlueBoxHeader"></div>
<asp:PlaceHolder ID="phBlue" runat="server"></asp:PlaceHolder>
</telerik:RadPageView>
<telerik:RadPageView ID="rpvYellow" runat="server" width="998px">
<div class="YellowBoxHeader"></div>
<asp:PlaceHolder ID="phYellow" runat="server"></asp:PlaceHolder>
</telerik:RadPageView>
<telerik:RadPageView ID="rpvGreen" runat="server" width="998px">
<div class="GreenBoxHeader"></div>
<asp:PlaceHolder ID="phGreen" runat="server"></asp:PlaceHolder>
</telerik:RadPageView>
</telerik:RadMultiPage>
<telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="Textarea" />
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestRotator.aspx.cs" Inherits="TestRotator" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <div> <telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Coverflow" Width="500px" OnClientItemShown="" Skin="Vista"> <ItemTemplate> <asp:Image ID="Image1" runat="server" Height="100px" Width="200px" ImageUrl='<%# Container.DataItem %>' AlternateText="<%# VirtualPathUtility.GetFileName(Container.DataItem.ToString()) %>" BorderStyle="Solid" BorderWidth="4px" BorderColor="Black" /> </ItemTemplate> </telerik:RadRotator> </div> </form> </body> </html>protected void Page_Load(object sender, EventArgs e) { RadRotator1.RotatorType = Telerik.Web.UI.RotatorType.CoverFlow; RadRotator1.DataSource = GetFilesInFolder("~/Images/HomeRotator"); RadRotator1.DataBind(); } protected List<string> GetFilesInFolder(string folderVirtualPath) { string physicalPathToFolder = Server.MapPath(folderVirtualPath);// Get the physical path string[] physicalPathsCollection = System.IO.Directory.GetFiles(physicalPathToFolder);// Get all child files of the given folder List<string> virtualPathsCollection = new List<string>();// Contains the result foreach (String path in physicalPathsCollection) { // The value of virtualPath will be similar to '~/PathToFolder/Image1.jpg string virtualPath = VirtualPathUtility.AppendTrailingSlash(folderVirtualPath) + System.IO.Path.GetFileName(path); virtualPathsCollection.Add(virtualPath); } return virtualPathsCollection; }