Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
277 views
I have some JScript that does some client side stuff and while it is doing that I want to show the RadLoadingPannel that is shown when AJAXing goes on on the page.

I added the following two functions which I would have thought would achieve this but it does nothing,

 
                var radLoadingPanelContent = null;  
                var currentUpdatedControl = null;  
                function showLoadingGraphic() {  
                    radLoadingPanelContent = $find("<%=radLoadingPanelContent.ClientID %>");  
                    currentUpdatedControl = "<%=divMainContent.ClientID %>";  
                    radLoadingPanelContent.show(currentUpdatedControl);  
                }  
                function hideLoadingGraphic() {  
                    if (radLoadingPanelContent != null) {  
                        radLoadingPanelContent.hide(currentUpdatedControl);  
                    }  
                    radLoadingPanelContent = null;  
                    currentUpdatedControl = null;  
                } 

You will notice they are completely separate from AJAX events (which is what I want).

I just want a client-side way to indicate to the user that something is loading without using AJAX (because it's so dam slow).

The following works but looks very messy,

 
                function showLoadingGraphic() {  
                    radLoadingPanelContent = document.getElementById("<%=radLoadingPanelContent.ClientID %>");  
                    radLoadingPanelContent.style.display = "block";  
                }  
                function hideLoadingGraphic() {  
                    radLoadingPanelContent = document.getElementById("<%=radLoadingPanelContent.ClientID %>");  
                    radLoadingPanelContent.style.display = "none";  
                } 

Jason
Top achievements
Rank 1
 answered on 25 Oct 2011
1 answer
79 views
Hi.
Could you please advice how to make images size smaller when rotator loads them (Image1), before srolling script starts.(Image2)
When page displayed all images in Rotator are scaled to their max size. Can I set them to the smaller size? Same as most images in Image 2. Or even hide all until scrolling script start working?

Thanks,
Slav
Telerik team
 answered on 25 Oct 2011
1 answer
69 views
Hi,
I'm using telerik's controls with resource files (in Globalresource Asp.net Folder) and in Internet Explorer the client events (eg scrolling, groupable etc...) are very slow, in Opera or Mozilla are not.
If I delete the Folder GlobalResources the control is faster and useful.
E.g. with RadGrid the scrolling is slowest with the GlobalResource, but without is not.

Why?
Thanks
Regards
Maria Ilieva
Telerik team
 answered on 25 Oct 2011
3 answers
79 views
Hello Everyone,

I have a website that has about 30+ subdomains.  (School district site)

I want to change the Styles in the RadEditor to allow people to choose styles specific to their campus without showing them all of the others. For the most part the styles would be identical other than colors and maybe font family.

We are actually using Sitefinity but I am not sure that this applies as it pertains to the editor itself.

We have a script that already grabs the url and extracts the subdomain for each campus and then adds a class to the body tag for that subdomain.

<body class="campus1">

we then have a matching css file that handles backgrounds and other campus specific things such as this

campus1.css

body.campus1 #banner { ... }

My question is can I use a similar strategy for changing the styles that a user can pick in the editor based on the subdomain?  I know I can assign a custom CSS file to the editor.  Can I do multiple CSS files?

ideas?
Rumen
Telerik team
 answered on 25 Oct 2011
3 answers
98 views
Hello Sir,
Im using a rad editor as ediotr in my web application.
 i added a table in radeditor from word and then after i set a table properties in radediotr to border type=solid and border width=1
after that when i see the report in pdf format then first cell width is increased .
i didnt find out the reason for that please tell me solution for that

pls reply ASAP.

thanks in Advancem,
Bhushan
Rumen
Telerik team
 answered on 25 Oct 2011
2 answers
86 views
In the following example: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

I would like to add a small spinning .gif in front of the "loading..." text to indicate activity. Is this possible?

You can look in the "LoadCountries()" javascript function of the examples source code to see where the "loading" text gets set.
Ivana
Telerik team
 answered on 25 Oct 2011
11 answers
340 views

I have implemented many RadGrids and they all work fine but for the life of me I can't understand why the "Update" command doesn't fire when I hit the update button. Here is my code:

Markup: This page is NOT ajaxified

<telerik:RadGrid ID="RadGridEmployees" runat="server" Visible="False" 
    AutoGenerateColumns="False" GridLines="None" AllowSorting="True" 
        AllowPaging="True" Width="975px" AllowAutomaticUpdates="false"
        AllowAutomaticInserts="false" AllowAutomaticDeletes="false">
    <HeaderContextMenu>
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </HeaderContextMenu>
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
    <MasterTableView AllowPaging="true" PageSize="25" DataKeyNames="UserID" EditMode="InPlace" 
    AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false">
    <Columns
        <telerik:GridEditCommandColumn ButtonType="ImageButton" >
            <ItemStyle VerticalAlign="Top" Width="5px" />
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="UserID" 
            Groupable="False" HeaderText="User ID" ReadOnly="True" SortExpression="UserID" 
            UniqueName="UserID">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="DIV_NUM" 
            Groupable="False" HeaderText="Division" ReadOnly="True" SortExpression="DIV_NUM" 
            UniqueName="DIV_NUM">
            <ItemStyle Width="50" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="TIN_NUM" 
            Groupable="False" HeaderText="TIN" ReadOnly="True" 
            SortExpression="TIN_NUM" UniqueName="TIN_NUM">
            <ItemStyle Width="100" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="FIRST_NAME" 
            Groupable="False" HeaderText="First Name" ReadOnly="True" 
            SortExpression="FIRST_NAME" UniqueName="FIRST_NAME">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" Groupable="False" 
            HeaderText="Last Name" ReadOnly="True" SortExpression="LAST_NAME" 
            UniqueName="LAST_NAME" DataField="LAST_NAME">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="BIRTH_YYYYMMDD" 
            DataFormatString="{0:d}" Groupable="False" HeaderText="DOB" ReadOnly="True" 
            SortExpression="BIRTH_YYYYMMDD" UniqueName="BIRTH_YYYYMMDD">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="UserEmail" 
            Groupable="False" HeaderText="E-Mail" SortExpression="UserEmail" 
            UniqueName="UserEmail">
            <ItemStyle Width="175" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="secQuestion" 
            Groupable="False" HeaderText="Security Question" ReadOnly="True" 
            SortExpression="secQuestion" UniqueName="secQuestion">
            <ItemStyle Width="125" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="secQuestionAnswer" 
            Groupable="False" HeaderText="Security Question Answer" ReadOnly="True" 
            SortExpression="secQuestionAnswer" UniqueName="secQuestionAnswer">
            <ItemStyle Width="125" />
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" UniqueName="ResetPasswordColumn" Text="Reset Password" CommandName="Reset">            
            <ItemStyle Width="50px" /> 
        </telerik:GridButtonColumn>
        <telerik:GridTemplateColumn UniqueName="Login">
            <ItemTemplate>
                <a href='Login.aspx?uid=<%# Container.DataItem("UserID") %>'
                                title="Log in as user" target="_blank">Login</a>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>    
                      
    <EditFormSettings CaptionDataField="UserId" EditFormType="Template"
        CaptionFormatString="Edit e-mail address for user: {0}.">
        <EditColumn UniqueName="EditCommandColumn1">
        </EditColumn>
        <FormTemplate>
  
            <div style="padding-top:10px"></div>
                      
            <table width="100%" align="center" cellspacing="5">
                <tr valign="top">
                    <td style="width:20%; font-weight:bold" align="right" nowrap>
                        *Email Address:
                    </td>
                    <td style="width:80%;" align="left">
                        <telerik:RadTextBox ID="RadTextBoxEmail" runat="server" MaxLength="50" SelectionOnFocus="SelectAll"></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="ValidatorEmail" runat="server" ErrorMessage="Please enter the e-mail address"
                        Display="None" ControlToValidate="RadTextBoxEmail" Text="*" SetFocusOnError="true" />
                        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutEmail"
                        TargetControlID="ValidatorEmail" HighlightCssClass="validatorCalloutHighlight" />
                    </td>
                </tr>
            </table>                      
                      
            <table style="width: 100%">
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="Button1" Text="Update" runat="server" CommandName="Update">
                        </asp:Button
                        <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                        </asp:Button>
                    </td>
                </tr>
            </table>
                      
            <div style="padding-bottom:30px"></div>
                   
        </FormTemplate>
  
    </EditFormSettings>
                  
</MasterTableView>
  
<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
</ClientSettings>
  
<FilterMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>

Code (which never fires):

Private Sub RadGridEmployees_UpdateCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles RadGridEmployees.UpdateCommand
    Dim lDataItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
    Dim lRadTextBoxEmail As RadTextBox = lDataItem.FindControl("RadTextBoxEmail")
    Dim lUserId As String = lDataItem.GetDataKeyValue("UserID")
    UserServiceHelper.UpdateUserEmail(lUserId, lRadTextBoxEmail.Text.Trim.ToLower)
    RadGridEmployees.EditIndexes.Clear()
End Sub


I don't get it...anyone?
Iana Tsolova
Telerik team
 answered on 25 Oct 2011
1 answer
150 views
Hello,

For the HeaderDateformat of the TimeLine view; can I change the value of this to be a non-date field?

For example - Instead of saying something like "October 2011 - November 2011", I would like for it to say something like "October N - 16" where N is a value of my choosing.  I have included some screenshots.

So, basically, can I problematically change this through code (client,server, or CSS)?
Plamen
Telerik team
 answered on 25 Oct 2011
3 answers
92 views
Hi
I think that I've found bug in RadGrid.
When I wrote such code:

var radGrid = $find("RadGrid1"));
radGrid.add_command(function (sender, args) {
                        alert("script command handler"); 
                    });

I never saw alert window.
But after I've added on the server side:
        <ClientSettings>
            <ClientEvents OnCommand="function() {  alert("script command handler 2");  }" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>

I saw 2 alerts.
So, now I live on server side:
<ClientEvents OnCommand="function() { }" />
And client handler works

Iana Tsolova
Telerik team
 answered on 25 Oct 2011
3 answers
232 views
Hi
I'm using the radchart in my application.
I need to set the height and width for the chart based on resolution of screen.
I try to on window.onload or window.resize.
But I'm getting the radchart null.

below is my code:

function ResizeRadChart() {
          var width = screen.width;
          var height = screen.height;
          var chrtObject = $find("<%= trndChrt.ClientID %>");
  
          switch (height) {
              case 1024:
                   //here i need set the chart height and width
                  break;
  
              case 960:
                   
                  break;
  
              case 864:
                    
                  break;
              case 768:
                    
                  break;
              case 720:
                   
                  break;
              case 600:
                    
                  break;
          }
      }
I'm getting null if I use the $find.
but I If I do like var chrtObject = $get("<%= trndChrt.ClientID %>");
I'm getting the object but not able to see height and width properties.
pls help me in this
Ves
Telerik team
 answered on 25 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?