Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
657 views

Dev environment: Win10, VS2017, DNN Evoq Community 9.1.1, target framework = 4.5, SqlServer 2012, Telerik 2017.2.711.40

Production environment: Win Server 2012, DNN Evoq Basic 9.1.1, target framework = 4.5, SqlServer 2012, , Telerik 2017.2.711.40

 

My custom DNN module allows row selection on my dev PC, but when I copy it to the server it does not allow row selection.  I have tried client- and server-side tactics. Any thoughts?

 

This is my markup in server-side mode.

    <telerik:RadGrid ID="rgPlacements" runat="server"
        AllowSorting="True"
        AutoGenerateColumns="False"
        HeaderStyle-HorizontalAlign="Center"
        HeaderStyle-VerticalAlign="Top"
        ItemStyle-VerticalAlign="Top"
        AlternatingItemStyle-VerticalAlign="Top"
        Skin="WebBlue"
        RenderMode="Classic"
        AllowPaging="True"
        PageSize="50"
        AllowMultiRowSelection="True"
        DataSourceID="sdsArchive"
        AllowFilteringByColumn="True"
        OnInit="rgPlacements_Init">
  
<%--        <ClientSettings>
            <Selecting AllowRowSelect="True"/>
        </ClientSettings>--%>
        <ExportSettings
            FileName="Placements"
            ExportOnlyData="true"
            IgnorePaging="true"
            OpenInNewWindow="true"
            HideStructureColumns="true">
        </ExportSettings>

        <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
        <AlternatingItemStyle VerticalAlign="Top" />
        <MasterTableView CommandItemDisplay="Top" DataKeyNames="PK_ID" DataSourceID="sdsArchive" Name="Placements">
            <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" ShowRefreshButton="false" />
            <Columns>
                <telerik:GridBoundColumn AllowFiltering="true" DataField="DisplayName" FilterControlAltText="Filter DisplayName column" HeaderText="Name" SortExpression="DisplayName" UniqueName="DisplayName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="false" DataField="HoursCompleted" DataType="System.Decimal" FilterControlAltText="Filter HoursCompleted column" HeaderText="Hours completed" SortExpression="HoursCompleted" UniqueName="HoursCompleted">
                    <ItemStyle HorizontalAlign="Center" Width="10%" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="true" DataField="Supervisor" FilterControlAltText="Filter Supervisor column" HeaderText="Supervisor" SortExpression="Supervisor" UniqueName="Supervisor">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="true" DataField="DateSupervisorApproval" DataFormatString="{0:d}" DataType="System.DateTime" FilterControlAltText="Filter DateApproved column" HeaderText="Approved" SortExpression="DateApproved" UniqueName="DateApproved">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="true" DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Org. name" SortExpression="Name" UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowFiltering="false" DataField="IsProBonoName" FilterControlAltText="Filter IsProBonoName column" HeaderText="Type" SortExpression="IsProBonoName" UniqueName="IsProBonoName">
                </telerik:GridBoundColumn>
<%--                <telerik:GridClientSelectColumn HeaderText="Archive" UniqueName="ClientSelectColumn">
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridClientSelectColumn>--%>
            <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="false">
              <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="ToggleRowSelection"
                  AutoPostBack="True" />
              </ItemTemplate>
              <HeaderTemplate>
                <asp:CheckBox ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState"
                  AutoPostBack="True" />
              </HeaderTemplate>
            </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
        <ItemStyle VerticalAlign="Top" />
    </telerik:RadGrid>

</telerik:RadAjaxPanel>
<asp:SqlDataSource ID="sdsArchive" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
    SelectCommand="sp_tlsGetPlacementsForArchiving" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter ControlID="hfToggleState" DefaultValue="0" Name="Archived" PropertyName="Value" Type="Boolean" />
    </SelectParameters>
</asp:SqlDataSource>

Marin Bratanov
Telerik team
 answered on 10 Aug 2017
5 answers
123 views
Good morning,

If I apply a class to a P element, when I hit enter to start a new paragraph, the same class is applied to the next paragraph.

For example:

<!-- I added this class -->
<p class="first_p_only">Only the first paragraph should be styled.</p>
<!-- Editor adds this class to all subsequent paragraphs -->
<p class="first_p_only">This paragraph should be style free.</p>
<p class="first_p_only">Also supposed to be style free.</p>

This mimics the behavior in Dreamweaver, which I always despised. If you need to apply a class to every p element, you should really define the style in the containing element.

Is there a way to disable this behavior? Or, failing that, a way to define a filter to remove it after Editor adds it?

Thanks,
Jeff
Shaun
Top achievements
Rank 1
 answered on 10 Aug 2017
20 answers
441 views
I am trying to make a grid alphabetic paging.
I have seen the demo in (Alphabetic Pager) http://demos.telerik.com/aspnet-ajax/grid/examples/programming/alphabeticpaging/defaultcs.aspx .

Iam binding the grid using  NeedDataSource event.
How can I pass the below select parameter to the program while performing the SELECT query.
<SelectParameters>
                <asp:Parameter Name="Letter" DefaultValue="%" />
</SelectParameters> 

I have just started using the telerik controls. Please help me on this.
Thanks,
Soumya



Eyup
Telerik team
 answered on 10 Aug 2017
19 answers
1.5K+ views
When using the FileExplorer control with a RadWindow as sort of FileDialog, is it possible to just select a folder path. I dont want to select a specific file, just a folder.


Thanks
Jason
Rumen
Telerik team
 answered on 10 Aug 2017
7 answers
162 views

When I add the following CSS to my aspx page the RadRating becomes unselectable in Safari-only (confirmed on ipad and iphone). Other browsers are fine.

html, body {
     height: 100%;
}

 

This CSS is necessary on some pages that also require a RadRating tool.

The page is running here: https://alpha.changeyourenergy.com/mgmt/Testing/radrating_no_master.aspx

The CSS in question is located here: https://alpha.changeyourenergy.com/style/revamp.css?v=151030.01

Note that if I tap the screen many times I can sometimes get the stars to highlight on Safari, but it is very difficult, inaccurate, and requires persistence.

Full ASPX page (the .cs page is essentially blank and not included here)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="radrating_no_master.aspx.cs" Inherits="mgmt_Testing_radrating_no_master" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>No Master</title>
 
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
    <style type="text/css">
        .ratingClass {
            position: relative;
            top: 100px;
            text-align: left;
            margin: 0 auto;
            padding: 0;
        }
    </style>
 
    <link id="BlowdryCSS" runat="server" rel='stylesheet' type='text/css' href='/style/blowdry.css?v=151030.01' />
    <link id="RevampCSS" runat="server" rel='stylesheet' type='text/css' href='/style/revamp.css?v=151030.01' />   
 
    <link id="GoogleMaterialIcons" href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
 
    <asp:Literal id="JQuery" runat="server" Text='<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>'></asp:Literal>
    <asp:Literal id="JQueryUI" runat="server" Text='<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>'></asp:Literal>
 
    <script async type="text/javascript">
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-62909613-1', 'auto');
        ga('send', 'pageview');
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="ScriptManager1">
            <Scripts>
                <%-- Google CDN Reference: https://developers.google.com/speed/libraries/ --%>
                <%--<asp:ScriptReference Path="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" />
                <asp:ScriptReference Path="https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js" />--%>
                <%--<asp:ScriptReference Path="<%# Eval("Source.CloudRoot") + "/" + Eval("Source.OneJS") %>" />--%>
                 
                <%--<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />--%>
 
                <%--<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryExternal.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryPlugins.js" />--%>
            </Scripts>
        </telerik:RadScriptManager>
 
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
     
        <div style="height:100%">
        <telerik:RadRating RenderMode="Lightweight" ID="ratingBar" runat="server" Orientation="Horizontal" ItemHeight="24px"
            ItemWidth="20px" CssClass="ratingClass" Skin="Silk" VisibleDuringInit="false">
            <Items>
                <telerik:RadRatingItem Value="1"
                    HoveredSelectedImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    ToolTip="Very Low"></telerik:RadRatingItem>
                <telerik:RadRatingItem Value="2" HoveredImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    HoveredSelectedImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    ToolTip="Low"></telerik:RadRatingItem>
                <telerik:RadRatingItem Value="3" HoveredImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    HoveredSelectedImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    ToolTip="Medium"></telerik:RadRatingItem>
                <telerik:RadRatingItem Value="4" HoveredImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    HoveredSelectedImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    ToolTip="Medium-High"></telerik:RadRatingItem>
                <telerik:RadRatingItem Value="5"
                    HoveredSelectedImageUrl="https://s3-us-west-1.amazonaws.com/changeyourenergy/images/icon/rating-stars-dark-orange-36x54.png"
                    ToolTip="High"></telerik:RadRatingItem>
            </Items>
        </telerik:RadRating>
        </div>
    </form>
 
     
    <script type="text/javascript">     var CloudRoot = "https://d1ululg65bfe3q.cloudfront.net";</script>
    <script src="https://forms.ontraport.com/v2.4/analytics/tracking.js" type="text/javascript"></script>
    <script>        _mri = '80479'; _mr_domain = 'changeyourenergy.ontraport.com'; mrtracking();</script>
     
    <%--<script src="http://d7f84ce2.ngrok.io/vorlon.js"></script>--%>
</body>
</html>
Rumen
Telerik team
 answered on 10 Aug 2017
2 answers
318 views

Hello

I want to add a custom font in Rad Editor. I added @font-face and URL to my ttf file. For testing purposes I added two DIVs outside the RAD editor and they are displaying the fonts correctly in both browsers. However, when I try to set a font on text in RadEditor, the font changes only if I'm in Firefox. If I'm in Google Chrome, this changing font in Editor does not work - instead of my custom font the default Times New Roman is used.

Here's the code and font file you can download from this link: https://dl.dropbox.com/s/xhi4lzca1zbq0fk/ArialUnicodeMS.ttf?dl=0

<%@ Page Language="VB" AutoEventWireup="false" EnableViewState="true"  %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html>
<html>
<head runat="server">
    <title>Test</title>
   <style type="text/css">
   
        @font-face {
            font-family: ArialUnicode;
            src: url('ArialUnicodeMS.ttf');
        }
       
   </style>
    
</head>
<body>
    <form id="form1" runat="server">
         
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">           
        </telerik:RadScriptManager>
 
        <div style="font-family: ArialUnicode">ArialUnicode</div>
        <div style="font-family: Arial">Arial</div>
 
        <telerik:RadEditor ID="RadEditor1" Runat="server" content ="Hello" RenderMode="Auto"  >
            <FontNames>
                <telerik:EditorFont Value="Arial" />
                <telerik:EditorFont Value="Times New Roman" />
                <telerik:EditorFont Value="ArialUnicode" />
            </FontNames>
        </telerik:RadEditor>
 
    </form>
</body>
</html>

 

Can you help me?

Thanks

 

Goran
Top achievements
Rank 1
 answered on 09 Aug 2017
7 answers
273 views
Hi,

We have a requirement to export from the RadScheduler to Excel. Is this possible?


Thanks,
Ryan
Rumen
Telerik team
 answered on 09 Aug 2017
0 answers
118 views

Hello,

This control appears to have a major problem:

I have this code:

 

<telerik:RadRadioButtonList ID="RadRadioButtonList1" runat="server" AutoPostBack="False">
    <Items>
        <telerik:ButtonListItem Text="ButtonListItem1" Value="value1" Selected="True" />
        <telerik:ButtonListItem Text="ButtonListItem2" Value="value2" />
    </Items>
</telerik:RadRadioButtonList>

 

I then have button with the following code:

protected void RadButton1_Click(object sender, EventArgs e)
{
    RadLabel1.Text = RadRadioButtonList1.SelectedItem.Value;
}

 

When this is run I get an error:

{"Object reference not set to an instance of an object."}

So the system does not recognise the items.

 

Developer
Top achievements
Rank 1
 asked on 09 Aug 2017
2 answers
163 views

Hello,

I would like to be able to display formatted within a RadGrid using either google prettify or .  I'm currently trying to display it within a NestedViewTemplate within a RadGrid.  Outside of the grid displays fine but it never works inside.  I'd also like to retain the skins if possible.

Here's a simple example:

                    <NestedViewTemplate>
                          <pre class="prettyprint">&lt;samplexml&gt;&lt;tag value=&quot;1&quot;/&gt;&lt;/samplexml&gt;</pre>
                    </NestedViewTemplate>

Thanks

Chris
Top achievements
Rank 1
 answered on 09 Aug 2017
3 answers
159 views
Hi

In the editor is there a way to cancel key presses? I've tried a couple of things (onkeyup return false etc). But the key pressed still gets into the text?

Thanks
David
Rumen
Telerik team
 answered on 09 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?