Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hi,
I have a letter template which is populated in my treeView, I wanted to drag and drop template items to both radeditor and textbox. During drag I want to change it to hand cursor and whenever it dragover my editor or textbox it will highlight the control. Any way I could accomplish this, any sample that I could refer to?
Thanks in advance,
RJ
RJ
Top achievements
Rank 1
 answered on 15 Aug 2012
1 answer
87 views
I am using RadTreeView to display forum menu. I want to show an alert image for all the forum menu which have new reply. So I want to show/hide an image on databound similar we do in Radgrid on the rowDataBound event.

My Treeview don't have any child nodes. Below is my tree view node. Simply i bind this tree from database and onNodeClick i redirect to the another page.

<telerik:RadTreeView id = "radtree"  runat = "server" onNodeClick="radtreeNode_Click">
</telerik:RadTreeView >

Thanks
Puru

Puru
Top achievements
Rank 1
 answered on 15 Aug 2012
1 answer
81 views
I get the following error when I remove all rows from the grid source and rebind the grid.

Error: 'this.get_element().tBodies.0.rows' is null or not an object

This does not happen in IE7. It happened to me in IE8 and Firefox.

ASPX:
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager" runat="server"></telerik:RadScriptManager>
    <telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"
            OnNeedDataSource="RadGrid1_NeedDataSource">
            <MasterTableView AutoGenerateColumns="True" ClientDataKeyNames="Id" DataKeyNames="Id" CommandItemDisplay="Top">
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True"></Selecting>
                <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton"
            onclick="RadButton1_Click">
        </telerik:RadButton>
    </telerik:RadAjaxPanel>
    </form>

C#:

private Dictionary<int, string> GridSource
{
   get
   {
       return (Dictionary<int, string>) ViewState["gridSource"];
   }
   set
   {
       ViewState["gridSource"] = value;
   }
}
protected void Page_Load(object sender, EventArgs e)
{
   if (!IsPostBack)
   {
       GridSource = new Dictionary<int, string>();
 
       for (int i=0; i<2; i++)
       {
           GridSource.Add(i, "test data " + i);
       }
   }
}
 
protected void RadButton1_Click(object sender, EventArgs e)
{
   GridSource.Remove(int.Parse(RadGrid1.SelectedItems[0].Cells[2].Text));
   RadGrid1.Rebind();
}
 
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
   RadGrid1.DataSource = from d in GridSource select new { Id = d.Key, Text = d.Value };
}
Leonard
Top achievements
Rank 1
 answered on 15 Aug 2012
3 answers
136 views
Hi,

Please response to kassaiefarshad@yahoo.com

I have used a RadEditor in webpart on Sharepoint 2010.However, some buttons like "Image Manager" or "Document Manager" or "Hyperlink Manager" and so forth in Editor doesn't work and return an error.
error is such as follow:
Server Error in '/' Application.
________________________________________
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
 
Requested URL: /_CONTROLTEMPLATES/Hojan.KMS.Webparts/KnowledgeEntry/Telerik.Web.UI.DialogHandler.aspx

any help appreciated.

Cheers,
Farshad


Vasu
Top achievements
Rank 1
 answered on 15 Aug 2012
3 answers
368 views
Is it possible to filter records onTextChanged or onKeyUp event of internal TextBox(Header TextBox) of Radgrid?
I dont want to select 'Start With', 'Contains' and other options from dropdown to filter records in Radgrid.

Find the attached file for more understanding...
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Aug 2012
2 answers
108 views
I can only seem to reproduce this in Chrome.  When a document is long enough to require a scrollbar, scrolling will put horizontal lines over the newly viewable part of the document. It seems to be related to the <td> which has a border that the iframe is in.  If I change the color of the border-bottom the lines output over the document change with it. I thought removing the border would resolve the issue, but it puts white lines over instead of black, transparent border has the same effect.  I can't seem to reproduce this in Chrome with regular iframes or any of the official demonstrations on this website.  

I have tried changing ContentAreaMode to DIV and although the lines do not appear with this it causes other issues so isn't a viable solution.

Any help anyone has would be much appreciated.
Brandon
Top achievements
Rank 1
 answered on 14 Aug 2012
2 answers
235 views

In my RadImageEditor declaration, I use the OnClientCommandExecuting attribute to prevent the save dialog from appearing.  I also use the OnImageLoading and OnImageSaving attributes so I can load/save the image to a database.  In the ImageSaving routine, I am trying to provide a success/fail confirmation on the screen by setting a label's text property to "File Saved".

When I click the Save button in the RadImageEditor, the file is saved but the label text is never updated.

I found a work around by adding my own asp.button on the form and calling the SaveEditableImage("",true) method.  But I'm hoping I can get the RadImageEditor save button to work.  In case is makes an difference, I'm currently using dll version 2011.3.1305.35.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadTest1._Default" %>
 
<%@ 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></title>
    <telerik:RadCodeBlock ID="codeblock1" runat="server">
 
        <script type="text/javascript">
            function OnClientCommandExecuting(sender, eventArgs) {
                if (eventArgs.get_commandName() == 'Save') {
                    var imEditor = $find("<%= RadImgEdt.ClientID %>");
                    imEditor.saveImageOnServer('', true);
                    imEditor.setToggleState('Save', false);
                    eventArgs.set_cancel(true);
                }
            }
        </script>
 
    </telerik:RadCodeBlock>
</head>
<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <div>
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
        <asp:Button ID="btnClose" runat="server" Text="Close" />
        <asp:Label ID="lblError" runat="server" EnableViewState="false" style="color: Red; margin-left: 5px;" />
    </div>
    <div style="margin-top: 50px;">
        <telerik:RadImageEditor ID="RadImgEdt" runat="server"
            OnImageLoading="RadImgEdt_ImageLoading"
            OnImageSaving="RadImgEdt_ImageSaving"
            OnClientCommandExecuting="OnClientCommandExecuting"
            Width="95%" Height="600px" style="top: 0px; left: 0px">
        </telerik:RadImageEditor>
    </div>
</form>
</body>
</html>

protected void RadImgEdt_ImageLoading(object sender, Telerik.Web.UI.ImageEditorLoadingEventArgs args)
{
    //TODO - Get image from imaging database
    string filename = Server.MapPath("TestImages");
    filename = Path.Combine(filename, "FatCat.jpg");
    MemoryStream mstream = new MemoryStream(File.ReadAllBytes(filename));
 
    Telerik.Web.UI.ImageEditor.EditableImage img = new Telerik.Web.UI.ImageEditor.EditableImage(mstream);
    args.Image = img;
    args.Cancel = true;
}
 
protected void RadImgEdt_ImageSaving(object sender, Telerik.Web.UI.ImageEditorSavingEventArgs args)
{
    //TODO - Save image to imaging database
    string filename = Server.MapPath("TestImages");
    filename = Path.Combine(filename, string.Format("FatCat-{0}.jpg", DateTime.Now.ToString("yyyyMMdd-hhmmss")));
 
    Telerik.Web.UI.ImageEditor.EditableImage img = args.Image;
    img.Image.Save(filename);
    lblError.Text = "File Saved";
    args.Cancel = true;
}
 
protected void btnSave_Click(object sender, EventArgs e)
{
    RadImgEdt.SaveEditableImage("", true);
}
Aaron Ford
Top achievements
Rank 1
 answered on 14 Aug 2012
3 answers
131 views
Hi, after upgrading to Q2 2012 for both RadControls and Telerik Reporting I noticed that the control icons for the Telerik Controls (ASP.NET and Reporting) are not on the toolbox on Visual Studio 2010.  I removed the previous version (Q1 2012) before installing the Q2 versions.  

I'm running Visual Studio 2010 Professional on Windows 7 64bit.  I tried re-installing, repairing the installations but I still don't get the items on the toolbox.  Any recommendations?

Thanks.

Yolanda
Chavdar Dimitrov
Telerik team
 answered on 14 Aug 2012
13 answers
1.3K+ views
Hi All,

I am new to radgrid, currently I have one issue when trying to export to excel using radgrid.

Seems when you use radgrid.ExportSettings.FileName to set up excel file name, this name will automatically become work sheet name as well. The problem is our requirement need a very long file name, which will be cut off as excel sheet name.We want to set up sheet name short, this way it won't show up as cut off name of excel file name.  Is there anyway we can set up the work sheet name during export process?

Thanks a lot, really appreciate it,
Helen
Daniel
Telerik team
 answered on 14 Aug 2012
6 answers
361 views
hi,

i'm experimenting an issue with a radautocompleteBox 
the rad autocomplete box is in a radwindow and when the radautocompletebox is in text mode it's working but in token mode the control is like disable i can't type anything in the textbox and there is no javascript error

here is the sample : 
<telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" InputType="Token"
    Width="300px" DropDownWidth="300px">
    <WebServiceSettings Method="GetCompanyNames" Path="~/WebService.asmx" />
</telerik:RadAutoCompleteBox>

also this sample is working outside of the radwindow..
i don't really need the token mode but i need the event  OnClientEntryAdding so if you have a workaround or something :-).

thanks for your help 


Kalina
Telerik team
 answered on 14 Aug 2012
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?