I am trying to implement a popup login screen using ajaxpopupextender.
Is it possible to use an aspx page(which is the login page ) to show in the Panel using iframe?
Is there any advantage of using page instead of user control inside the panel? Does both gets loaded on parent page_load? considering faster page load Plase suggest which method to be used?
Try this way
<asp:Panel ID="pnlPopUp" Style="display: none ;padding:3px;" runat="server" >
//Test.aspx page is a page which you want to show as a popup
<iframe id="frame1" src="Test.aspx" style="overflow: auto;height:200px; width: 100%;" scrolling="auto"></iframe>
</asp:Panel>
<asp:ModalPopupExtender ID="mdlPopup" Y="50" runat="server" BehaviorID="mpe" TargetControlID="btnShowPopup" PopupControlID="pnlPopUp" BackgroundCssClass="bModal">
</asp:ModalPopupExtender>
Related
I'm confused. I've thought it's possible to pass SpringBoot/Thymeleaf objects from the html page to the Modal form. I've come across many examples using ajax to pull data from the REST endpoint instead.
Is using ajax to pull in objects into Modals, the only method?
Thymeleaf is a server side templating language... the concept of a modal form usually means showing/hiding a window opens and closes on the client side (meaning JavaScript that runs when a user clicks a link or a button ). If you don't want to use an API to pull that data (which I think makes the most sense), then you have to create a hidden modal for every row on your page. For example:
<div th:each="item, i: ${items}">
<a href="#"
onClick="openModal(this.getAttribute('data-modal'))"
th:data-modal="|#modal${i.index}|">
Edit modal #<span th:text="${i.index}" />
</a>
<div th:id="|modal${i.index}|" style="display: none;">
<p>I am a modal form for element <span th:text="${i.index}" />!</p>
<input type="text" th:value="${item.value}" />
</div>
</div>
You can see how this works... creating a hidden div/modal form for every row (so you don't have to call an API to get the form values), but it comes with a lot of extra HTML.
In my webpage, I have a RadTabStrip containing RadTab:s which will decide which page view the webpage that is shown.
<telerik:RadTabStrip ID="rtsTabs2" runat="server" MultiPageID="rmpMultiPage2"
AutoPostBack="True" SelectedIndex="0" OnTabClick="rtsTabs2_TabClick">
<Tabs>
<telerik:RadTab Text="Page 1" PageViewID="pvPage1" />
<telerik:RadTab Text="Page 2" PageViewID="pvPage2" />
</Tabs>
</telerik:RadTabStrip>
The page views are defined like this:
<telerik:RadMultiPage ID="rmpMultiPage2" runat="server">
<telerik:RadPageView ID="pvPage1" runat="server">
RadGrids etc
</telerik:RadPageView>
<telerik:RadPageView ID="pvPage2" runat="server">
More RadGrids etc
</telerik:RadPageView>
</telerik:RadMultiPage>
The page views contains numerous components that will be populated from the database.
However, I will only be interested in populate those when a page view containing them is displayed.
Which event should I listed at to determine when to populate components?
The OnLoad event in RadPageView is triggered when the page load, regardless if the page view is shown or not.
The OnPreRender event in RadPageView is also triggered on page load.
The OnNeedDataSource event in GridView is the same, the event triggers when the page loads.
Using Visible="False" in a RadPageView only results in page views that will never show up even if the corresponding RadTab is clicked.
I have a RadGrid in a RadWindow set to Modal.
I'm seeing two issues.
The first and most critical ONLY HAPPENS IN IE7 and NOT in FIREFOX is that the Filter Menus of the RadGrid do not display when clicked. Instead a box the size of the menus is opened through which I can see the parent page.
The second and probably related HAPPENS IN BOTH IE AND FIREFOX is that when I drag the RadWindow the content of the RadWindow disappears and is replaced by the same transparency to the parent page.
Any help you could offer would be great. I've spent all day hunting and pecking through CSS trying to find it.
Grid and window declarations follow.
<telerik:RadWindowManager
OnClientClose="OnViewerClose"
Behaviors="Close, Move, Resize,Maximize"
ID="RadWindowManager"
DestroyOnClose="true"
Opacity="99"
runat="server">
<Windows>
<telerik:RadWindow
ID="AssociateUserWindow"
VisibleOnPageLoad="false"
Width="600"
Height="400"
runat="server"
Overlay="true"
KeepInScreenBounds="true"
Modal="true"
Skin="WebBlue">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<telerik:RadGrid
ID="rgUsers"
runat="server"
AllowPaging="true"
AllowSorting="true"
AutoGenerateColumns="false"
CellPadding="1"
CellSpacing="2"
GridLines="Vertical"
Skin="WebBlue"
Width="100%"
OnItemDataBound="rgUsers_ItemDataBound"
OnNeedDataSource="rgUsers_NeedDataSource"
PageSize="5"
>
<PagerStyle Mode="NumericPages"></PagerStyle>
<MasterTableView DataKeyNames="UserId" AllowMultiColumnSorting="True" AllowFilteringByColumn="true" HierarchyDefaultExpanded="true">
<Columns>...ommitted...</Columns>
</MasterTableView>
</telerik:RadGrid>
Are you able to extract a runnable sample that displays the issue? If you can I think the best thing to do here, since the markup that you posted looks completely fine, is to submit this in a support ticket over at Telerik. Their support guys will probably be the best to figure out what the issue might be.
Nevermind. I've found the issue... that opacity setting was the culprit. Removing it from the radwindow manager fixed it.
I really need some help with this. I need to, using a RadWindow control, pop up a modal window containing a dynamically populated CheckBoxList based on user selection on dropdownlist changed. Please help with any sample or information to help me achieve this.
<telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Width="250" Height="536" VisibleOnPageLoad="false" Modal=true Behaviors="Minimize, Move, Resize,Maximize" Left="580" Top="-8" EnableShadow="true">
<ContentTemplate>
<div style="text-align: center;">
LIST OF STUFF TO DISPLAY
</div>
</ContentTemplate>
</telerik:RadWindow>
When using ContentTemplate, RadWindow behaves and can be used just like any other standard INamingConatiner.
For more details, check the help article and the demo on the subject.
I have an update panel on an .aspx page. Within this aspx page I have a few ascx controls. One of the controls has my link button. When that button is pressed I'd expect to get the results I intend to get, but I expect to not see a page flicker or see the page postback. It does both. After I change some search information and click the link button again the page does an async postback (which is what I expected on the first click). After running this sequence through fiddler I see that the first time I click the button I am missing some information that is included in all subsequent requests.
ctl00$ScriptManager1=ctl00$cplContents$updatePanelOrderSearch|ctl00$cplContents$ucOrderSearchControl$btnRange&EVENTTARGET=ctl00%24cplContents%24ucOrderSearchControl%24btnRange&.....
Above is what I get on clicks 2, 3, etc.. This is not in the request when I click on the link button the very first time. Im wondering if this is why I am get a full, non async postback the first time.
Any help would be appreciated. My update panel code is below.
<asp:UpdatePanel ID="updatePanelOrderSearch" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
<ContentTemplate>
<uc:control1 "this control has the link button" />
<hr />
<div id="SearchResults">
<div id="SearchResultsMessage">
<asp:Literal ID="lblMessage" Text="No orders found" Visible="false" runat="server" />
</div>
<uc:contorl 2 />
</div>
<uc: control3 />
</ContentTemplate>
</asp:UpdatePanel>
Thanks
this was an issue from months ago and we wound up not using this solution