Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
433 views
Hi there! The RadEditor is amazing, just want to get that out of the way :) Was wondering if there is a way to get the Format Code Block Preview syntax highlight features enabled for the Source Code window in the editor. We want to make it so when you view the code you can view the syntax highlight and have it format the code properly? is that possible?

thanks
Rumen
Telerik team
 answered on 14 Nov 2012
3 answers
361 views
Hi,
I want to show the selected image as the preview, i have used below code but it is not working and tools.
i am using Visual Studio 2010 Premium,

<telerik:RadUpload ID="RadUpload1" runat="server" OnClientFileSelected="OnClientFileSelected" AllowedFileExtensions=".bmp,.jpeg,.jpg,.gif"  MaxFileSize="100000000"/>

<asp:Image id = "imgTheme"   runat="server" ClientIdMode = "Static"/>

<script type = "test/javascript">
function OnClientFileSelected(sender, args){
var image = document.getElementById("imgTheme");
image.src = args.get_fileInputField().value;
}
</script>

in java script i am able to get the image, i have shaw the image control in the alert. But when i saw image source in the alert it show the path "C:\\fakePath\imagefileName", and i am not uploading the image from the c drive.

Thanks
Plamen
Telerik team
 answered on 14 Nov 2012
4 answers
166 views
I have a RadGrid with a DetailTable in it.  When I expand a row in the MasterView to show the Detail, I want to change the detail row's Edit link text based on the data in the detail row.

For example if the row has col1="Blah", then I want the edit text to be "Edit Blah" instead of "Edit".

What's the easiest way to do this?
TechSavvySam
Top achievements
Rank 1
 answered on 14 Nov 2012
3 answers
139 views
Does asp.net ajax has something similar to silverlight RadTimeBar?

I need to display time and finished percentage task. ie, at what time, finished what percentage.

What is the right control for me to use in asp.net ajax?

Thanks
Plamen
Telerik team
 answered on 14 Nov 2012
3 answers
123 views
Hi,
I have a TreeView and RadGrid width drag and drop functionality (drag from TreeView  and drop to RadGird). To Detect which node is dropped on RadGrid, I have added a nodeDrop handler to TreeView. So When i drop a node on RadGrid, nodeDrop handler fires, but SourceDragNode and DraggedNodes of RadTreeNodeDragDropEventArgs  parameter are null. This happens just when I move TreeView and RadGrid to an UserControl.
What things may cause this issue?

I have checked my post data at client side, an it seems OK (dropped node index has correct value ).

any idea is appreciated.
Boyan Dimitrov
Telerik team
 answered on 14 Nov 2012
11 answers
460 views
Hi,

Using the RadFormDecorator (Q1 2008.1.619.20), setting the focus on any control on IE7 does not work but works as expected in Firefox.  Remove RadFormDecorator and IE7 works correctly.

<body> 
    <form id="form1" runat="server"> 
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" 
        Skin="Sunset" /> 
    <AjaxToolKit:ToolkitScriptManager EnablePartialRendering="true" ID="ScriptManager1" 
        runat="server" CombineScripts="true" /> 
    <div> 
        <br /> 
        <telerik:RadComboBox ID="RadComboBox1" runat="server" MarkFirstMatch="true"> 
            <Items> 
                <telerik:RadComboBoxItem Value="" Text="" /> 
                <telerik:RadComboBoxItem Value="1" Text="1" /> 
                <telerik:RadComboBoxItem Value="2" Text="2" /> 
            </Items> 
        </telerik:RadComboBox> 
        <br /> 
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
        <asp:Button ID="button1" runat="server" Text="submit" CssClass="testx" /> 
    </div> 
    </form> 
</body> 

Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender 
        ScriptManager.GetCurrent(Page).SetFocus(RadComboBox1) 
    End Sub 

Is there any work around for this?
Thanks,
Khanh

Danail Vasilev
Telerik team
 answered on 14 Nov 2012
1 answer
115 views
All thumbnails are saved in .png format. How can I keep the original image's format on thumbnails? If I edit on a .jpg image, I want the thumbnail also to be a .jpg image.
This is what I have tried with no success:
protected void RadImageEditor1_ImageSaving(object sender, ImageEditorSavingEventArgs args)
{
    var thumbImage = args.Image.Clone();
    var pathToThumbs = "~/Filarkiv/thumb/";
    thumbImage.Resize(96, 96);
 
    var ms = new MemoryStream();
    thumbImage.Image.Save(ms, args.Image.RawFormat);
    File.WriteAllBytes(String.Format("{0}{1}.{2}", MapPath(pathToThumbs), args.FileName, args.Image.Format), byte[])ms.ToArray());
}


Roy
Roy Halvorsen
Top achievements
Rank 1
 answered on 14 Nov 2012
5 answers
174 views
Since upgrading to q3 2012 from q2, an extraneous extra border is added around the control. Not the border that is set by the control's property settings but another around the control...  is this a bug?

Here is a sample code page and screenshot (IE9 on Win7)  (attached)

I have deliberately made the actual control border red solid to show the issue.

=======================================================================
<%@ Page Language="VB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="SM1"></asp:ScriptManager>
    <telerik:radrotator id="RadRotator1" runat="server" datasourceid="XmlDataSourceSubsKeyInfo"
        frameduration="8000" rotatortype="AutomaticAdvance" scrolldirection="Up" height="190px"
        width="178px" backcolor="#eeeeff" BorderStyle="Solid" BorderColor="#ff0000">
        <ItemTemplate>
            <div style="width: 166px; height: 178px; padding: 0 6px;"><br /><br />
                <%# XPath("product") %>
            </div>
        </ItemTemplate>
    </telerik:radrotator>
    <asp:XmlDataSource ID="XmlDataSourceSubsKeyInfo" runat="server" DataFile="~/xml/test.xml">
    </asp:XmlDataSource>
    </form>
</body>
</html>
==========================================

Aarsh
Top achievements
Rank 1
 answered on 14 Nov 2012
12 answers
329 views
PDF export of X columns is producing another extra X blank columns.  This must be some really simple error, but I just can't find it.  Here's the code:
<asp:Button ID="ExportToPDF" runat="server" Text="ExportToPDF"
    OnClick="ExportToPDF_Click"/>
<telerik:RadGrid ID="RadGrid2" runat="server" GridLines="Vertical" AutoGenerateColumns="false" Width="800px">
<ExportSettings ExportOnlyData="true"></ExportSettings>
</telerik:RadGrid>
    public partial class gridtest : System.Web.UI.UserControl
    {
        int iNumCols = 5;
 
        protected void Page_Init(object sender, EventArgs e)
        {
            CreateRadGrid2();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                FillRadGrid2();
        }
 
        internal void CreateRadGrid2()
        {
            for (int iCol = 0; iCol < iNumCols; iCol++)
            {
                GridBoundColumn col = new GridBoundColumn();
                col.HeaderText = "Col"+iCol.ToString();
                col.DataField = "Col"+iCol.ToString();
                RadGrid2.MasterTableView.Columns.Add(col);
            }
        }
 
        internal void FillRadGrid2()
        {
            // create an empty data table, matching the bound columns of the grid
            DataTable dt = new DataTable();
            for (int iCol = 0; iCol < iNumCols; iCol++)
                dt.Columns.Add("Col"+iCol.ToString());
 
            // fill in the data for the rows
            for (int iRow = 0; iRow < 5; iRow++)
            {
                DataRow dr = dt.NewRow();
                for (int iCol = 0; iCol < iNumCols; iCol++)
                    dr["Col" + iCol.ToString()] = "R" + iRow.ToString() + "C" + iCol.ToString();
                dt.Rows.Add(dr);
            }
            RadGrid2.DataSource = dt;
            RadGrid2.DataBind();
        }
 
        protected void ExportToPDF_Click(object sender, EventArgs e)
        {
            this.RadGrid2.MasterTableView.ExportToPdf();
        }
}

The resulting PDF is attached.
Kostadin
Telerik team
 answered on 14 Nov 2012
1 answer
91 views
Hello

I am using radgrid q3 2009. I am setting information in a CommandItemTemplate in the pre_render event of the grid. However if the grid is grouped and/or has a master/detail relationship the information in the CommandItemTemplate is lost/reset when you expand the group or details table. Please can you advise how to resolve this

thanks
Angel Petrov
Telerik team
 answered on 14 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?