Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
650 views
I'm not a .Net programmer by trade but, I need to make some customizations to editor. I was wondering if someone could tell me if WebResource.axd creates a local cache of the javascript files that are sent to the client when requested, and how to force the cache to be re-generated from the source copies? My changes aren't showing up on the client side even after clearing cache, disabling browser cache and trying on 3 different browsers.
Ianko
Telerik team
 answered on 24 Mar 2015
4 answers
129 views
I have an issue when attempting to print from the RadEditor in IE11.  
The print button opens the standard print dialog box - which prints the entire web page - not the contents of the radeditor in either div or iframe contentmode.
In Chrome it works fine - it opens a preview page which prints the contents as expected.
I have attempted to use togglefullscreen to send the radeditor into full screen mode - but it only expands as far as the bounds of the table cell it is contained within, in chrome in works fine and expands to full page as expected - but can't use this option it seems in IE.

is there any trick to allowing RadEditor to open the print preview dialog in ie, and to preview just the contents of the radeditor, and also ensure that the togglefullscreen mode expands to cover the entire screen??

thanks.  M.
Ianko
Telerik team
 answered on 24 Mar 2015
3 answers
154 views
Hello,

Are there any known conflicts between Telerik Ajax Controls and AjaxToolKit 15.1? 
There are many things using Telerik.  Just wanted to check before I install the update.

Thanks
JS
Pavlina
Telerik team
 answered on 24 Mar 2015
1 answer
194 views
Hi,

I have a RadGrid which is initialzed to a SqlDataSource and itz working fine. Now, I want to make one of the data field from the sql source as a HyperText.

I am doing following in Code Behind.

GridHyperLinkColumn hyperlinkcolumn = GridHyperLinkColumn();
hyperlinkcolumn.DataField = "<MyColumnName_FromSql>"
hyperlinkcolumn.DataNavigateUrlFields = "<MyColumnName_FromSql>"
hyperlinkcolumn.DataNavigateUrlFormatString = "URL String"

MyGrid.Columns.Add(hyperlinkcolumn);

Whne I do this, I am seeing two columns. One original column from the sql data source and one hyperlink column i added.

I tried additing to MasterTableView as well. But still two columns are coming.

I expect only hypertext column to present and original column to not present.

How to achieve this??

THanks
Satish

Eyup
Telerik team
 answered on 24 Mar 2015
3 answers
306 views
Folks I am using VS 2010 SP1 and RadControls for ASP.NET AJAX Q1 2012. I would like the following steps if possible in Rad Grid:

1)  After Edit, highlight the last edited row in Grid.

2)  After Insert, without any user interaction (automatically)
   
      A) Retrieve the Primary Key value of newly inserted row, 
      B) Highlight (Select) newly inserted row in Grid
      C) Open the newly inserted row in Edit Mode to enter some additional data that are not required in initial insert.
      D) Show the Primary Key Value of newly inserted row in a Label in Edit Form.

3) After user Updates or Cancel in Step 2, do Step #1 (i.e. highlight the last edited row in Grid)

Is these above possible?

I am using below link as sample (RadGrid2).  and attached is my code.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx


Thanks

GC_0620
-------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Grid.Examples.Programming.CommandItem.DefaultCS" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head runat="server">
    <!-- custom head section -->
    <style type="text/css">
        .bigModuleBottom td
        {
            padding: 0;
        }
    </style>
    <!-- end of custom head section -->
</head>
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <!-- content start -->
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                    <telerik:AjaxUpdatedControl ControlID="Label3" />
                    <telerik:AjaxUpdatedControl ControlID="Label4" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div>
        <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
        <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
    </div>
    <br />
    <br />
    <br />
    <br />
    <div class="bigModule">
        <div class="bigModuleBottom">
            <%--<div class="title">
                    Default command-item outlook</div>--%>
        </div>
    </div>
    <br />
    <div>
        <asp:Label ID="Label3" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
        <asp:Label ID="Label4" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
    </div>
    <br />
    <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" AllowSorting="True"
        AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
        PageSize="7" AllowPaging="True" GridLines="None" runat="server" ShowFooter="True"
        OnItemCreated="RadGrid_ItemCreated" OnItemDeleted="RadGrid_ItemDeleted" OnItemUpdated="RadGrid_ItemUpdated"
        OnItemInserted="RadGrid_ItemInserted" Skin="Vista" OnItemCommand="RadGrid2_ItemCommand">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource2"
            InsertItemPageIndexAction="ShowItemOnCurrentPage" DataKeyNames="CustomerID" AutoGenerateColumns="false"
            InsertItemDisplay="Top">
            <Columns>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="CustomerID" UniqueName="CustomerID" HeaderText="Customer ID"
                    MaxLength="5">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CompanyName" UniqueName="CompanyName" HeaderText="Company Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContactName" UniqueName="ContactName" HeaderText="Contact Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContactTitle" UniqueName="ContactTitle" HeaderText="Contact Title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address" UniqueName="Address" HeaderText="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="City" UniqueName="City" HeaderText="City">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                </telerik:GridButtonColumn>
            </Columns>
            <CommandItemSettings AddNewRecordText="Add new record" AddNewRecordImageUrl="Images/AddRecord.gif"
                RefreshText="Refresh" RefreshImageUrl="Images/Refresh.gif" />
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
    <br />
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
        DeleteCommand="DELETE FROM [Customers] WHERE [CustomerID] = @CustomerID" InsertCommand="INSERT INTO [Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City)"
        SelectCommand="SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City] FROM [Customers]"
        UpdateCommand="UPDATE [Customers] SET [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City WHERE [CustomerID] = @CustomerID">
        <DeleteParameters>
            <asp:Parameter Name="CustomerID" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="CustomerID" Type="String" />
            <asp:Parameter Name="CompanyName" Type="String" />
            <asp:Parameter Name="ContactName" Type="String" />
            <asp:Parameter Name="ContactTitle" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="City" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="CompanyName" Type="String" />
            <asp:Parameter Name="ContactName" Type="String" />
            <asp:Parameter Name="ContactTitle" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="CustomerID" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <!-- content end -->
    <p>
         </p>
    </form>
</body>
</html>

_____________

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
namespace Grid.Examples.Programming.CommandItem
{
    public partial class DefaultCS : System.Web.UI.Page
    {
        
        
        protected void RadGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
           
            GridEditableItem item = e.Item as GridEditableItem;
            if (item != null && e.Item.IsInEditMode && e.Item.ItemIndex != -1)
            {
                (item.EditManager.GetColumnEditor("CustomerID").ContainerControl.Controls[0] as TextBox).Enabled = false;
            }
        }
 
        protected void RadGrid_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
        {
            if (e.Exception != null)
            {
                e.KeepInEditMode = true;
                e.ExceptionHandled = true;
                DisplayMessage(true, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["CustomerID"] + " cannot be updated due to invalid data.");
            }
            else
            {
                DisplayMessage(false, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["CustomerID"] + " updated");
            }
        }
 
        protected void RadGrid_ItemInserted(object source, GridInsertedEventArgs e)
        {
            if (e.Exception != null)
            {
                e.ExceptionHandled = true;
                e.KeepInInsertMode = true;
                DisplayMessage(true, "Customer cannot be inserted due to invalid data.");
            }
            else
            {
                DisplayMessage(false, "Customer inserted");
            }
            e.Item.Edit = true;
        }
 
        protected void RadGrid_ItemDeleted(object source, GridDeletedEventArgs e)
        {
            if (e.Exception != null)
            {
                e.ExceptionHandled = true;
                DisplayMessage(true, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["CustomerID"] + " cannot be deleted");
            }
            else
            {
                DisplayMessage(false, "Customer " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["CustomerID"] + " deleted");
            }
        }
 
        private void DisplayMessage(bool isError, string text)
        {
            if (isError)
            {
                this.Label1.Text = text;
                this.Label3.Text = text;
            }
            else
            {
                this.Label2.Text = text;
                this.Label4.Text = text;
            }
        }
 
 
        protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
        {
            
        }
}
}




Eyup
Telerik team
 answered on 24 Mar 2015
3 answers
94 views
RadSocialShare generates a js error on page load, in IE 11.  The Error does not occur in Chrome:
Line: 6
Error: Unable to set property 'control' of undefined or null reference

VS2013  .Net 4.5
Windows 8.1
RadControls for ASP.Net Q3 2013   version 2012.3.1308.45



<telerik:RadSocialShare runat="server" ID="RadSocialShare1" UrlToShare="http://www.telerik.com/products/aspnet-ajax.aspx"
         TitleToShare="ASP.NET AJAX Controls, .NET Web UI Components | Telerik">
         <MainButtons>
             <telerik:RadSocialButton SocialNetType="ShareOnTwitter" />
             <telerik:RadSocialButton SocialNetType="Blogger" />
             <telerik:RadSocialButton SocialNetType="ShareOnFacebook" />
             <telerik:RadCompactButton />
         </MainButtons>
     </telerik:RadSocialShare>

Danail Vasilev
Telerik team
 answered on 24 Mar 2015
1 answer
123 views
Hi.

I am printing a div with a radhtmlchart and a couple radgrids in it and it works a treat. (Looking forward to the page break feature next release though!!)

I need to be able to have a hidden image at the top and bottom of this div that only displays when I export to PDF. I've tried to put them in display:none divs and use  @media print {
            .printOnly {
                display: block;
            }
        }

But this doesn't work. I assume because the PDF export isn't actually a print operation. Is there another way I could do this?

Thanks for your help.
Chris 
Peter Filipov
Telerik team
 answered on 24 Mar 2015
8 answers
496 views
In server-side how can I Redirect AWAY from a RadMultiPage with RadTabStrip to a different aspx page ?
Geoff
Top achievements
Rank 1
 answered on 24 Mar 2015
1 answer
83 views
The "Image Editor" dialog (accessed via the RadEditor > Image Manager) seems to have a problem with the form captions when the  "App_GlobalResources" folder is present. The captions are prefixed with "ImageEditor_StatusBar_" - which as you can see in the attachment, causes ugly problems with the layout. Removing the "App_GlobalResources"  directory does fix this, but we would like to keep the multi-lingual support if possible. Obviously the resx file could be manually updated to include these translations, but I don't know what others might be missing. Is there perhaps an up-to-date resx file downloadable from somewhere?
Vessy
Telerik team
 answered on 24 Mar 2015
5 answers
259 views
Hi,

I would like to print or  export the content of my radgantt control. I'm using the Q3 2014 version of telerik UI for ASP.Net AJAX.


Thanks.
Bozhidar
Telerik team
 answered on 24 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?