Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
182 views
I have a RadAjaxLoadingPanel in a user control (I develope with Sitefinity) and i am trying to make the full browser screen shade or overlay with a transparency when someone clicks a button to perform a action, i have found some info on this within the forums but none talk about it from within a usercontrol.

Could somone help me get this working? This is what i have so far:

html, 
body, 
form 
{ 
    min-height:100%; /*all except IE6*/ 
    margin:0; 
    padding:0; 
} 
 
* html html, 
* html body, 
* html form 
{ 
    height:100%; /*IE6 only*/ 
} 
 
body { 
    background-color: #5b9cda; 
} 
 
....etc.... 


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsletterSignupMini.ascx.cs" 
    Inherits="UserControls_NewsletterSignupMini" %> 
<telerik:RadCodeBlock runat="server"> 
 
    <script type="text/javascript"> 
     
   function centerUpdatePanel() 
   { 
        centerElementOnScreen(document.getElementById("<%=RadAjaxLoadingPanel1.ClientID%>")); 
   } 
    
   function centerElementOnScreen(element) 
   { 
        var scrollTop = document.body.scrollTop; 
        var scrollLeft = document.body.scrollLeft; 
        var viewPortHeight = document.body.clientHeight; 
        var viewPortWidth = document.body.clientWidth; 
     
        if (document.compatMode == "CSS1Compat") 
        { 
         viewPortHeight = document.documentElement.clientHeight; 
         viewPortWidth = document.documentElement.clientWidth; 
         scrollTop = document.documentElement.scrollTop; 
         scrollLeft = document.documentElement.scrollLeft; 
        } 
         
        var topOffset = Math.ceil(viewPortHeight/2 - element.offsetHeight/2); 
        var leftOffset = Math.ceil(viewPortWidth/2 - element.offsetWidth/2); 
        var top = scrollTop + topOffset - 40; 
        var left = scrollLeft + leftOffset - 70; 
           element.style.position = "absolute"; 
        element.style.top = top + "px"; 
        element.style.left = left + "px"; 
    } 
    </script> 
 
</telerik:RadCodeBlock> 
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" 
    ClientEvents-OnRequestStart="centerUpdatePanel();"> 
    <table border="0" cellspacing="0" cellpadding="0" class="NewsletterTable"> 
        <tr> 
            <td class="Name"> 
                <telerik:RadTextBox ID="txtFirstName" runat="server" EmptyMessage="First Name" SkinID="sknNewsletterMini_Name" 
                    TabIndex="1" ValidationGroup="valNewsletterForm"> 
                </telerik:RadTextBox> 
                <asp:RequiredFieldValidator ID="valreqFirstName" runat="server" Display="Dynamic" 
                    ControlToValidate="txtFirstName" ValidationGroup="valNewsletterForm" /> 
            </td> 
            <td class="Name"> 
                <telerik:RadTextBox ID="txtLastName" runat="server" EmptyMessage="Last Name" SkinID="sknNewsletterMini_Name" 
                    TabIndex="2" ValidationGroup="valNewsletterForm"> 
                </telerik:RadTextBox> 
                <asp:RequiredFieldValidator ID="valreqLastName" runat="server" Display="Dynamic" 
                    ControlToValidate="txtLastName" ValidationGroup="valNewsletterForm" /> 
            </td> 
            <td rowspan="2" class="Button"> 
                <asp:ImageButton ID="btnNewsletterSignup" runat="server" SkinID="sknNewsletterMini_Button" 
                    TabIndex="4" OnClick="btnNewsletterSignup_Click" ValidationGroup="valNewsletterForm" /> 
            </td> 
        </tr> 
        <tr> 
            <td colspan="2" class="Email"> 
                <telerik:RadTextBox ID="txtEmail" runat="server" EmptyMessage="Email Address" SkinID="sknNewsletterMini_Email" 
                    TabIndex="3" ValidationGroup="valNewsletterForm"> 
                </telerik:RadTextBox> 
                <asp:RegularExpressionValidator ID="valexpEmail" runat="server" Display="Dynamic" 
                    ControlToValidate="txtEmail" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="valNewsletterForm" /><asp:RequiredFieldValidator ID="valreqEmail" 
                        runat="server" Display="Dynamic" ControlToValidate="txtEmail" ValidationGroup="valNewsletterForm" /> 
            </td> 
        </tr> 
    </table> 
</telerik:RadAjaxPanel> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" IsSticky="true" 
    Skin="Web20" Style="position: absolute; top: 0px; left: 0px; width: 100%; height:100%" EnableSkinTransparency="true" 
    Transparency="20"> 
</telerik:RadAjaxLoadingPanel> 

This is not filling the whole screen, instead is seems to be the size of the control container... It is centered on the screen though. Additionally i am unable to see the Web20 skin loading gif...

Any help would be great

Duncan
Iana Tsolova
Telerik team
 answered on 24 Sep 2009
1 answer
138 views
I installed Telerik Trial Q1 for first time, the complete option, but when I drag and drop a Telerik Control, appear this error

"Could not load file or assembly 'Telerik.Web.UI, Version=2009.1.527.35..."

I installed in other machine and appear the same error.

Can you help me

Thanks.
Shinu
Top achievements
Rank 2
 answered on 24 Sep 2009
1 answer
147 views
Hi there, just to avoid confusion, I am not asking about adding ItemTemplate in run time.

At moment, we can add normal radcombobox items with .items.add, how can we do equivalent for itemtemplate items? If we don't rebind it everytime anything new.

Searched for posts and get no result, pls help, thanks
Shinu
Top achievements
Rank 2
 answered on 24 Sep 2009
5 answers
156 views
Hello- how do we control the sort order of the folders in the RadFileExplorer?  We want the folders to appear in descending order so:

2009
2008
2007
etc...

Thanks
Lini
Telerik team
 answered on 24 Sep 2009
1 answer
105 views
Hi there,

I have reviewed several of your samples, including the Database state version of the portal.   While that is very close to what I am trying to achieve, the main difference on my end, is that my DockZones are created Dynamically as well.

Do you have any examples like this?   The problem I am running into specfiically compared to the existing DB Portal example is that my Docks(s) are floating, because it cannot figure out which DockZone to add it to.  


Thanks,

BG
Pero
Telerik team
 answered on 24 Sep 2009
4 answers
1.6K+ views
Hi,

I have to create a RadGrid to enable users to enter data. The row may contain few texbox and Popup buttons. I should enable eight rows to allow them to enter eight records in a time. Some one pls guide me or get me some similar examples for me to proceed with.

Thanks in Advance
Jidesh
Martin
Telerik team
 answered on 24 Sep 2009
1 answer
121 views
I am been going over this and can't seem to get it working.  I am trying
to make a 3 layer (1 MTV and 2 Childs) that will let users filter the 3rd
layer based on a RadComboBox (Pick column) and RadTextBox (Contains ....)
outside of the grid.

I am using WebMethods in the code-behind file of the page.  I cannot
seem to figure out how to get all these items working together in sync.

Actually, I can't seem to figure out how to get the programmatic client
data binding to work with PageMethods.  I have found very little in my
search on the forum.  The items I have found don't seem to work.
I have tried WebServices but can't seem to get them to work on the
server.  I keep getting a 'WebService' is undefined when running the
page.  I have searched everywhere and tried all combinations of possible
issue from changing the web.config file to alterating the way its called
in JavaScript.  WebMethods using Dictionary is the only way I have been
able to pull the data and have it display.

Any ideas about how I can set this up using WebMethod and Dictionary
to return the data?  Forgot, I am using Linq to Sql Classes and
Dynamic Linq in case it make a difference.  Thanks in advance.

Josh
Nikolay Rusev
Telerik team
 answered on 24 Sep 2009
3 answers
473 views

I am trying to use programmatic client side binding with my grid, however,
the grid keeps saying "No records to display.".  Below is my code.  Does
anyone see why it is not populating my grid?  I have verified that I do get
my data passed back in JSON format in the correct Method Names.

Oh yeah, when the grid first comes up it has paging enable, but
after the button click and grid.dataBind is does not.

I was thinking it was the OnDataBinding() handler because at
first I was not using the standard SelectMethod and Count Names.
Still doesn't work though.

<script type="text/javascript">  
var tableview;  
 
    function pageLoad() {  
        tableview=$find("Grid").get_masterTableView();  
    }  
    function ButtonClick(sender, args) {  
        PageMethods.GetEvents(0, 100, "", "",GetData);  
        return false;  
    }  
    function GetData(Data) {  
        tableview.set_dataSource(Data);  
        tableview.dataBind();  
    }  
    function Grid_DataBinding(sender, args) {  
        alert("Made it this far.");  
        sender.ClientSettings.DataBinding.SelectMethod = "GetData";  
        sender.ClientSettings.DataBinding.SelectCountMethod = "GetCount";  
        sender.ClientSettings.DataBinding.FilterParameterType = "Linq";  
        sender.ClientSettings.DataBinding.SortParameterType = "Linq";  
    }  
</script> 

<asp:ScriptManager ID="MainScript" runat="server" EnablePageMethods="true" /> 
    <asp:Button ID="Button1" runat="server" Text="Get Data" OnClientClick="return ButtonClick();" /> 
    <rad:RadGrid runat="server" ID="Grid" AutoGenerateColumns="false" Height="670px" AllowPaging="true"   
    PageSize="15" Skin="Telerik">  
    <MasterTableView TableLayout="Fixed" ClientDataKeyNames="EventID,EventName" Height="670px">  
   <Columns> 
    <rad:GridBoundColumn HeaderText="EventID" DataField="EventID" /> 
    <rad:GridBoundColumn HeaderText="EventID" DataField="EventName" /> 
   </Columns> 
   </MasterTableView> 
   <ClientSettings> 
 <ClientEvents OnCommand="function(){}" OnDataBinding="Grid_DataBinding" /> 
 <Scrolling AllowScroll="true" /> 
 <Selecting AllowRowSelect="true" /> 
</ClientSettings> 
</rad:RadGrid> 

        [WebMethod]  
        public static Dictionary<string, object> GetEvents(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)  
        {  
            var filter = !string.IsNullOrEmpty(filterExpression);  
            var sort = !string.IsNullOrEmpty(sortExpression);  
 
            var data = new LinqtoSqlDataContext();  
            var eventdata = (from e in data.Events  
                             select new 
                             {  
                                 EventID = e.EventID,  
                                 EventName = e.EventName  
                             })  
                         .Where(filter ? filterExpression : "EventID > 0")  
                         .OrderBy(sort ? sortExpression : "EventID ASC");  
 
            var count = filter ? eventdata.Count() : data.Events.Count();  
            eventdata = eventdata.Skip(startRowIndex).Take(maximumRows);  
            return new Dictionary<string, object> { { "GetData", eventdata }, { "GetCount", count } };  
        } 
Nikolay Rusev
Telerik team
 answered on 24 Sep 2009
1 answer
103 views
Hi,

THis is live url

http://www.seeds-lanka.com/minute/document.aspx

I have created blog inculding all the code , How did i create popup window

You can see code from
 http://radwindow.blogspot.com/

My problem is first time popup window working find , When i try second time window is laoding but cant see content. If i change grid row and load again its loading fine. But second time for same row same like previous

can you check code and see what happen


Yavor
Telerik team
 answered on 24 Sep 2009
1 answer
76 views
Hi,

                    <td> 
                        <label class="reDialogLabel"> 
                            <span style="text-align: right;">Margin </span> 
                        </label> 
                    </td> 
In EditorDialogs/setimageproperties.ascx should be

                    <td align="right"> 
                        <label class="reDialogLabel"> 
                            <span style="text-align: right;"> 
                                <script type="text/javascript"> 
                                    document.write(localization["Margin"]); 
                                </script> 
                            </span> 
                        </label> 
                    </td> 





Georgi Tunev
Telerik team
 answered on 24 Sep 2009
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?