Hi
What techniques/controls can I use to implement the following?
A popup window displays formatted 'terms & conditions' text in html with a scroll bar. When user scroll downs to the very bottom of the text using the scroll bar then the ‘I accept’ tick box is enabled. Once user closes the popup window the value of the acceptance tick box is passed to the calling form.
Many Thanks
Regards
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnSave"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="CreatePanel" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="rgCampaigns" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="EditFailureText" /> <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rgCampaigns"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgCampaigns" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="EditFailureText" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" BackgroundPosition="Center" EnableSkinTransparency="true"></telerik:RadAjaxLoadingPanel><h1>Campaigns</h1><p>Before you can create any content to share with your Partners, you must first create a campaign. This will allow your partners the ability to access any resources you share for the campaign.</p><asp:Panel runat="server" ID="CreatePanel"> <h2>Create your campaign(s)</h2> <p> <asp:Label ID="CreateFailureText" runat="server" ForeColor="Red" /> </p> <fieldset class="register"> <legend>Create campaign</legend> <table> <tr> <td colspan="3"><asp:ValidationSummary ID="ValidationSummary1" ForeColor="Red" DisplayMode="SingleParagraph" HeaderText="You must complete the fields marked with a *" runat="server" /></td> </tr> <tr> <td> Name:</td> <td> <telerik:RadTextBox ID="txtName" runat="server" EmptyMessage="Please type a name for the campaign" Width="230px"> </telerik:RadTextBox> </td> <td> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ErrorMessage=""></asp:RequiredFieldValidator> <font color="red">*</font></td> </tr> <tr> <td> Description</td> <td> <telerik:RadTextBox ID="txtDescription" runat="server" EmptyMessage="Please type a description for your campaign" Rows="5" style="margin-bottom: 0px" TextMode="MultiLine" Width="230px"> </telerik:RadTextBox> </td> <td> </td> </tr> </table> <asp:Button ID="btnSave" runat="server" Text="Save" /> </fieldset> </asp:Panel><asp:Panel runat="server" ID="EditPanel" Visible="false"> <h2>Edit your campaigns</h2> <p>You may use the table below to edit/delete existing campaigns that currently exist on your system. <br /><b>Please be aware that if you delete a campaign ALL content and partner content will be deleted</b></p> <p> <asp:Label ID="EditFailureText" runat="server" ForeColor="Red" /> </p> <fieldset> <legend>Edit existing campaigns</legend> <telerik:RadGrid ID="rgCampaigns" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None"> <MasterTableView EditMode="EditForms"> <EditItemTemplate> </EditItemTemplate> <CommandItemSettings ExportToPdfText="Export to Pdf" /> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ID" Display="False" FilterControlAltText="Filter ID column" ReadOnly="true" HeaderText="ID" UniqueName="ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserId" Display="False" FilterControlAltText="Filter UserId column" HeaderText="UserId" ReadOnly="True" UniqueName="UserId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" UniqueName="Name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn AllowFiltering="False" DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" UniqueName="Description"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CreationDate" FilterControlAltText="Filter CreationDate column" HeaderText="Date created" UniqueName="CreationDate"> </telerik:GridBoundColumn> <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column" HeaderText="Edit"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn CommandName="Delete" FilterControlAltText="Filter Delete column" HeaderText="Delete" Text="Delete" UniqueName="Delete"> </telerik:GridButtonColumn> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <fieldset class="register"> <legend>Edit campaign</legend> <table> <tr> <td colspan="3"><asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="Edit" ForeColor="Red" DisplayMode="SingleParagraph" HeaderText="You must complete the fields marked with a *" runat="server" /></td> </tr> <tr> <td> Name:</td> <td> <telerik:RadTextBox ID="txtName" ValidationGroup="Edit" runat="server" Text='<%# Bind("Name") %>' EmptyMessage="Please type a name for the campaign" Width="230px"> </telerik:RadTextBox> </td> <td> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationGroup="Edit" runat="server" ControlToValidate="txtName" ErrorMessage=""></asp:RequiredFieldValidator> <font color="red">*</font></td> </tr> <tr> <td> Description</td> <td> <telerik:RadTextBox ID="txtDescription" ValidationGroup="Edit" runat="server" Text='<%# Bind("Description") %>' EmptyMessage="Please type a description for your campaign" Rows="5" style="margin-bottom: 0px" TextMode="MultiLine" Width="230px"> </telerik:RadTextBox> </td> <td> </td> </tr> </table> <asp:Button ID="btnUpdate" ValidationGroup="Edit" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'> </asp:Button> <asp:Button ID="btnCancel" ValidationGroup="Edit" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </FormTemplate> <EditColumn FilterControlAltText="Filter EditCommandColumn column"> </EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu EnableImageSprites="False"> </FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"> </HeaderContextMenu> </telerik:RadGrid> </fieldset></asp:Panel>We use iframe to show another page in RadWindow.
We create windows dynamically in code.
function openNewWindow(itemUrl, itemText) {
if (itemUrl) {
var wHeigh = 400;
var wWidth = 550;
var windowURL = itemUrl;
var oWnd = radopen(itemUrl, null);
var iconUrl = oWnd.get_iconUrl();
// set the new ICon
oWnd._titleIconElement.style.background = "transparent url('" + iconUrl + "') no-repeat scroll 0px 0px";
if (itemText != "") {
oWnd.set_title(itemText);
}
oWnd.moveTo(20, 20);
oWnd.add_resize(OnClientResize);
var restZoneDiv = document.getElementById("RestrictionZone");
oWnd.set_width(wWidth);
oWnd.set_height(wHeigh);
}
}
When resizing RadWindow for the first time height never changes. There is no problem with width but height does not change.
On second attempt all work fine. Good height is retrieved in code and RadWindow is resized correctly.
Do you know where could be a problem?
Thanks for answers
RadoCaptchaImage-TextChars
="Numbers"
Does the demo need to be upgraded or changed or is my Captcha control somehow wrong?
Lynn
<telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" AllowSorting="True" PageSize="20" AllowFilteringByColumn="True" EnableViewState="False" AutoGenerateColumns="False" Skin="Office2007" GridLines="None" OnItemCreated="RadGrid1_ItemCreated" OnPreRender="RadGrid1_PreRender"OnNeedDataSource="PC_NeedDataSource"><telerik:GridBoundColumn SortExpression="ClientName" DataField="ClientName" HeaderText="Client Name" HeaderStyle-Width="300px"> <FilterTemplate> <telerik:RadComboBox ID="RadComboBoxClientName" DataTextField="ClientName" DataValueField="ClientName" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007"> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function ClientNameIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); if (args.get_item().get_value() == "0") { tableView.filter("ClientName", args.get_item().get_value(), "NoFilter"); } else { tableView.filter("ClientName", args.get_item().get_value(), "EqualTo"); } } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridBoundColumn>protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridFilteringItem) { GridFilteringItem filterItem = (GridFilteringItem)e.Item; RadComboBox combo = (RadComboBox)filterItem["ClientName"].FindControl("RadComboBoxClientName"); if (Session["AdvisorClientID"] == null) { ClientDataContext db = new ClientDataContext(); var clients = (from c in db.Clients select new { c.ClientID, c.ClientName, }) .OrderBy(c => c.ClientName); combo.DataSource = clients; RadComboBoxItem newItem = new RadComboBoxItem(); newItem.Text = "*** ALL ***"; newItem.Value = "0"; combo.Items.Insert(0, newItem); int test = RadGrid1.MasterTableView.FilterExpression.IndexOf("ClientName = \""); if (test > 0) { string clientName = RadGrid1.MasterTableView.FilterExpression.Replace("(ClientName = \"", ""); clientName = clientName.Replace("\")", ""); combo.SelectedValue = clientName;// combo.FindItemByValue(clientName); } } else { combo.Visible = false; } } }