Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
512 views
I am using Q1 2008 and have a form using multiple rad controls and rad windows.  When I add the PromptTemplate with a rad control to my window manager, I get the following error:

Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Here is my code as copied from (
http://www.telerik.com/support/kb/article/b454K-hbc-b454T-cec-b454c-cec.aspx
and
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx):

If I remove both telerik controls, no error; but if I place either control then I get the page cannot be null error.

<telerik:RadWindowManager ID="RadWindowManager1" runat="server"   
    Skin="Mac" Modal="true" VisibleStatusbar="false" VisibleOnPageLoad="false" 
    ReloadOnShow="true" ShowContentDuringLoad="false">  
    <PromptTemplate> 
        <script type="text/javascript">  
            function closePrompt()  
            {  
                var select = document.getElementById('select');  
                var selectselectselectedValue = select.options[select.selectedIndex].value;  
                GetRadWindow().ModalDialogCallBack(selectedValue);  
            }  
        </script> 
          
        <style type="text/css">  
            .Button      
            {      
                background: url({2}Img/modalBtnBg.gif) no-repeat; border: 0px; width: 78px; height: 20px; color: #333; font: normal 11px Verdana,Arial, Sans-serif; margin: 2px;  
            }   
            .FixedDiv      
            {      
                font: normal 11px Verdana, Arial,Sans-serif;      
                margin: 3px;      
                color: black;      
                text-align: center;      
            }      
        </style>    
        <div class='FixedDiv'>     
            <center> 
                <br />    
                <img align="absmiddle" style='vertical-align: middle; border: 0' src='{2}Img/AlertIcon.gif' /> 
                Please enter your password:  
                <br /> 
                <telerik:RadTextBox ID="userPassword" runat="server" MaxLength="50" 
                    TextMode="Password" Skin="Mac" EnableEmbeddedSkins="false"   
                    SelectionOnFocus="SelectAll">  
                </telerik:RadTextBox> 
                <br /> 
                <br /> 
                Please select your domain:  
                <telerik:RadComboBox ID="userDomain" runat="server"   
                    DropDownWidth="100px" RadComboBoxImagePosition="Right"   
                    Skin="Mac" Width="100px" EnableEmbeddedScripts="true"   
                    ToolTip="Select a domain." 
                    > 
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    <ExpandAnimation Type="OutQuart"></ExpandAnimation> 
                    <Items> 
                        <telerik:RadComboBoxItem Text="DOMAIN1" Value="DOMAIN1" /> 
                        <telerik:RadComboBoxItem Text="DOMAIN2" Value="DOMAIN2" Selected="true" /> 
                    </Items> 
                </telerik:RadComboBox> 
                <br /> 
                <br /> 
                <button class="Button" onclick="closePrompt()">OK</button> 
                <button class="Button" onclick="GetRadWindow().Close()">Cancel</button> 
            </center>    
        </div>    
    </PromptTemplate> 



Georgi Tunev
Telerik team
 answered on 03 Jun 2008
3 answers
192 views
Hi,
If I want to prevent event bubbling in  a combo box client event how can i do it ?
with Internet Explorer's windows.event i can access the last event  that took place. and stop it from bubbling but with firefox it is not possible. is there a way to access the event from sender or eventArgs, or  what is the best approach to solve this issue.
function OnClientSelectedIndexChanged(sender, eventArgs)
{
}

Thanks in advance

Nad
Rosi
Telerik team
 answered on 03 Jun 2008
3 answers
154 views
I have 2 questions about the RadScheduler, that I can not find a solution for in the documentation. I'm using Stored Procedures for databinding, insert, update and delete.
  1. When I ad a new event to my RadScheduler, it allways shows as Recurrent. I guess this has something to do with what I insert into the tablefields RecurranceParentId and RecurrenceRule. What is the default value for those 2 fields if an event is nonreccurrent, and What is the default value for RecurranceParentId if an event is recurrant?
  2. If I have a recurrent event but I want to delete one of the occurences in the series, what will the SQL statement look like? The same goes for updating an occurence in a series.

Examples would be much appreciated.

Inge Wandsvik
Top achievements
Rank 1
 answered on 03 Jun 2008
6 answers
252 views
I have a related thread in the General Discussion forum, but this is a more specific problem:

When you modify the My Portal demo to create a dynamic dock + user control upon the changing of a tab (rather than upon a button click), the tabs no longer function correctly from a UI standpoint. Clicking the tabs does fire the right trigger and cause the creation of a dock+user control. However, the tabs don't change (the default tab is always shown), and the associated PageViews don't change either (the default pageview is always shown). Here is the hidden DIV code from the demo, modified for a tab strip:

            <div class="hidden"> 
                <!-- Hidden UpdatePanel, which is used to receive the new dock controls. 
                     We move the new dock controls to the desired initial dock zone using script. --> 
                <asp:UpdatePanel runat="server" ID="updatePanel"> 
                    <Triggers> 
                        <asp:AsyncPostBackTrigger ControlID="mainTabStrip" EventName="TabClick" /> 
                    </Triggers> 
                </asp:UpdatePanel> 
            </div> 

I suspect that the asynchronous postback trigger is causing the issue. Any ideas on how to fix the problem?
Sophy
Telerik team
 answered on 03 Jun 2008
12 answers
672 views
I have products displayed by .NET's ListView control like this:

<asp:ListView ID="productsList" runat="server">
    <LayoutTemplate>
        <asp:DataPager ID="productsPager" runat="server" 
            PageSize="9">
            <Fields>     
                <asp:NumericPagerField
                    ButtonCount="10"
                    NextPageText="..."
                    PreviousPageText="..." />
                <asp:NextPreviousPagerField
                    FirstPageText="First"
                    LastPageText="Last"
                    NextPageText="Next"
                    PreviousPageText="Previous" />
            </Fields>
        </asp:DataPager>
   
        <div class="products">
            <asp:PlaceHolder id="itemPlaceholder" runat="server"></asp:PlaceHolder>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <div class="<%= GetProductCssClass() %>">
            <div class="productImage">
                <img src="/images/products/<%# Eval("Image") %>" width="100" />
            </div>
            <div class="productName">
                <asp:Label ID="productName" runat="server">
                    <%# Eval("Name") %>
                </asp:Label>
            </div>
            <div class="productPrice">
                <asp:Label ID="productPrice" runat="server">
                    <%# String.Format("{0:C}", Eval("Price"))%>
                </asp:Label>
            </div>
        </div>
    </ItemTemplate>
</asp:ListView>

See the problem is that the items are being generated dynamically, so how can I create a tooltip window for each item generated 9or maybe a master tooltip for all items)?
Sebastian
Telerik team
 answered on 03 Jun 2008
4 answers
212 views
I've been searching, but I can't find a solution to this problem.

I'm trying to set a background image for a RadGrid header.  I've tried various things, using pointers from these forums and the exmample found here.

I've still not been able to make it stick.  I'm probably missing something obvious, can anyone see what?

Stripped down project can be download from here.

~I
Iain
Top achievements
Rank 1
 answered on 03 Jun 2008
3 answers
128 views
Is anyone having this issue...or able to reproduce it?

Certain skins of the tooltip that use images as borders for the tooltip dont always show up on the client.

I was able to change the skin of the RelativeTo sample to Web20, Vista, and Office2007 on my locally installed set and was seeing the same issue, I'm not sure if its something with the control or with my browser(IE7)/machine.

UPDATE: The borders are not showing up when the tooltip is in a user control that is used on the form, if I add a tooltip with the same properties directly on the form and assign it to a different target for testing, the borders always appear. Could be an issue of page/user control | master/content scenarios??
 
Svetlina Anati
Telerik team
 answered on 03 Jun 2008
3 answers
226 views
Hi all
I have  a scenario

I put a tooltip which opens for a click of an hyperlink
Inside tooltip i put some textboxes and dropdowns and an imagebutton
for the  onclick event of the imagebutton i have put some code on codebehind
but the problem is the onclick event is not firing and i am not able to execute the code which i put on onclick event

Thanks in advance for the HELP
Svetlina Anati
Telerik team
 answered on 03 Jun 2008
1 answer
150 views
When using a RadEditor inside a RadToolTip, RadEditor custom dialogs appear underneath the RadToolTip. How can this be fixed? Thanks!
Svetlina Anati
Telerik team
 answered on 03 Jun 2008
1 answer
162 views
Hello guys,
Given the following layout: a splitter with 2 vertical oanes,
i have  a button in a pane (left pane)that updates the contents in another pane using AjaxManager.
The problem is that after the request is processed, the other two buttons from the left pane, which are simple HTML input controls, that are in the left pane does not work properly.
One of them triggers a rad tooltip and the other one a rad window
Please find below the sample page which reproduces the problem. Note that when i am entering the page for the first time, the buttons are working perfectly. This behavior happens only after the ajax postback.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Aberatii.Test" %> 
 
<!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" style="height:100%"> 
<head runat="server"> 
    <title>Untitled Page</title> 
</head> 
<body style="margin: 0px; height: 100%;"> 
    <form id="form1" runat="server" style="height: 100%; margin: 0px"> 
    <telerik:RadScriptManager ID="ScriptManager" runat="server" EnableTheming="True"> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager runat="server" ID="ajaxManager"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnSearch"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="c" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadWindowManager ID="rwm" runat="server" InitialBehavior="Default" Width="770" Height="700"> 
    </telerik:RadWindowManager> 
    <telerik:RadToolTip runat="server" ID="filterTooltip" TargetControlID="btnAdvancedFilter" 
        ShowEvent="OnClick" Sticky="true" Animation="None" IsClientID="true" Position="BottomRight" 
        ManualClose="true" AutoCloseDelay="3000" Modal="true"> 
         
        <asp:Label ID="l" runat="server" Text="Tooltip element" /> 
         
    </telerik:RadToolTip> 
    <telerik:RadWindow Modal="true" Height="600px" Width="800px" runat="server" ID="wndAddSubject" 
        OpenerElementID="btnAddSubject" NavigateUrl="http://www.google.com"> 
    </telerik:RadWindow> 
    <telerik:RadSplitter runat="server" ID="PageSplitter" Orientation="Vertical" BorderSize="0" 
        BorderStyle="None" Width="100%" Height="100%" Skin="Outlook"> 
        <telerik:RadPane runat="server" ID="leftNavigation" Width="260" Height="100%"> 
            <telerik:RadAjaxPanel runat="server" ID="leftAjaxPanel"> 
                <div id="search-bar"> 
                    <input name="btnAdvancedFilter" type="button" value="Criterii" class="btnDefault" /> 
                    <asp:Button ID="btnSearch" Text="Cautare" runat="server" ToolTip="Cautare!!" OnClick="btnSearch_Click" /> 
                    <input name="btnAddSubject" type="button" value="Adaugă subiect" class="btnDefault" /> 
                </div> 
                <div class="clear" /> 
                <div id="toc-title"> 
                    Lista categorii</div> 
                <div class="clear" /> 
                 
            </telerik:RadAjaxPanel> 
        </telerik:RadPane> 
        <telerik:RadSplitBar runat="server" ID="resizeBar" CollapseMode="Both" /> 
        <telerik:RadPane runat="server" ID="contentPane"> 
            <asp:Label ID="c" runat="server" /> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 

And the code behind:
     protected void btnSearch_Click(object sender, EventArgs e) 
        { 
            c.Text = "POSTBACK " + DateTime.Now.ToString(); 
        } 


And also, can you help me with the size of the splitter, when i put a treeview that will eventually expand more than the available canvas, i would like to "push" the splitter as well


Best regards,
Lucian CHIRIAC
Svetlina Anati
Telerik team
 answered on 03 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?