Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
I just downloaded RadEditor and the documentation on the download page as well as in the downloaded archive does not seem to be working for me.  It opens up and I see the table of contents to the left, but the right panel just says "Navigation Cancelled".  I have tried on multiple computers.

I am trying to see if this will work with MOSS 2010.  It sounds like a very cool utility.
Stanimir
Telerik team
 answered on 13 May 2010
1 answer
208 views
Hello, I have a bit of an interesting question:

For my application I need to implement a very stripped down version of the table editor. Just the ability to do the following:

  • Set columns and rows.
  • Optionally denote the top row as a "header".
  • Optionally denote the bottom row as a "footer".

Would it be possible for someone to point me in the right direction on where to start doing this or a successful strategy for getting it done?

One option that occurred to me was to create my own dialog and custom button that gives this functionality and then injects the table structure into the content area - but would this allow the user to modify the table? Would I have to add javascript events into the content area to enable things like handles for dragging column widths or adding new rows?

Really, I guess I am just polling for some potential strategies to sift through before I get started on what could potentially be quite a bit of work.

Thanks in advance

John
Rumen
Telerik team
 answered on 13 May 2010
1 answer
192 views
I have a RadEditor as a user control opening in a RadWindow. I have a custom dialog which is an ImageManager called from a button on the RadEditor. So far so good. The dialog opens when you click my button, and closes when you click Insert or Cancel.

But I can't get anything to happen on Insert. I'm looking at all sorts of examples and it appears that ClientCallbackFunction is what I should be focusing on. I've tried putting the JS function on the page called in the RadWindow, in the user control, and also registering it in the user control's script. All I'm trying to get it to do is alert something when the dialog closes, but nothing happens at all.

if (HasBackgroundImage) 
                    { 
                        string script = @"
                        <script language ='javascript'>
                        function OnClientLoad(editor)
                        {
                                var style = editor.get_contentArea().style; 
                                style.backgroundImage = 'url(/UserImages/backgrounds/" + strBgImg + @")'; 
                                style.backgroundRepeat = 'no-repeat';
                                style.backgroundPosition = 'top right';
                        }
                        function BackgroundManagerFunction(sender, args)   
                        {   
                             alert('OK');
                             
                        }  
                        </script>"
                        Page.ClientScript.RegisterClientScriptBlock(GetType(), "CommentScript", script, false); 
                        RadEditor1.OnClientLoad = "OnClientLoad"
                    } 
The first bit of registered JS works fine. It loads the BG image on client load.

Here's the code for my custom dialog:
if (HasBackgroundImage) 
                    { 
                        // Custom image manager 
                        Telerik.Web.UI.Editor.DialogControls.FileManagerDialogParameters backgroundFileManagerParameters = new Telerik.Web.UI.Editor.DialogControls.FileManagerDialogParameters(); 
                        backgroundFileManagerParameters.ViewPaths = new string[] { "~/UserImages/Backgrounds/" }; 
                        backgroundFileManagerParameters.UploadPaths = new string[] { "" }; 
                        backgroundFileManagerParameters.DeletePaths = new string[] { "" }; 
                        backgroundFileManagerParameters.MaxUploadFileSize = 5000000;                       
                        // If you don't set the following property, the default value will be used 
                        //backgroundFileManagerParameters.SearchPatterns = new string[] { "*.jpg,*.gif,*.png" }; 
                        DialogDefinition backgroundImageManagerDialog = new DialogDefinition(typeof(Telerik.Web.UI.Editor.DialogControls.ImageManagerDialog), backgroundFileManagerParameters); 
                        backgroundImageManagerDialog.ClientCallbackFunction = "BackgroundManagerFunction"
                        backgroundImageManagerDialog.Width = Unit.Pixel(680); 
                        backgroundImageManagerDialog.Height = Unit.Pixel(420); 
                        //If you need to customize the dialog then register the external dialog files 
                        //backgroundImageManagerDialog.Parameters["ExternalDialogsPath"] = "~/AdminEditorDialogs/"; 
                        RadEditor1.DialogOpener.DialogDefinitions.Add("backgroundImageManager", backgroundImageManagerDialog); 
                    } 
That code works fine too. My dialog exists and opens as expected.

Here's my code for RadEditor1 and the rest of the stuff on my page:
<asp:Panel ID="pnlTitle" runat="server" DefaultButton="btnUpdateTitle" > 
    <b>Title:</b>  
    <asp:TextBox ID="txtTitle" runat="server" CssClass="textBox" Width="560px"></asp:TextBox>  
    <asp:Button id="btnUpdateTitle" runat="server" CssClass="button" Text="Update Title" CausesValidation="false" OnClientClick="UpdateTitle(); return false;" /> 
    <br /> 
</asp:Panel> 
<asp:Panel ID="pnlSubTitle" runat="server" DefaultButton="btnUpdateSubTitle"
    <b>Sub-Title:</b> 
    <asp:TextBox ID="txtSubTitle" runat="server" CssClass="textBox" Width="560px"></asp:TextBox>  
    <asp:Button id="btnUpdateSubTitle" runat="server" CssClass="button" Text="Update Sub-Title" CausesValidation="false" OnClientClick="UpdateSubTitle(); return false;" /> 
</asp:Panel> 
<telerik:RadEditor runat="server" ID="RadEditor1" ExternalDialogsPath="~/AdminEditorDialogs"  
AutoResizeHeight="false" EnableResize="false"
<ImageManager ViewPaths="~/UserImages" UploadPaths="~/UserImages" /> 
<Content> 
</Content> 
</telerik:RadEditor> 
<script type="text/javascript"
    Telerik.Web.UI.Editor.CommandList["BackgroundImage"] = function(commandName, editor, args) 
    { 
      editor.showDialog("backgroundImageManager"); 
    }; 
</script>  


When I choose a file from the backgroundImageManagerDialog and click "Insert" there's no alert. The dialog closes.

I've also tried doing something other than alert, as in changing the value of a text box on the page. That doesn't happen either.

I get no JS errors. In fact, when I was first setting this up, I had the ClientCallbackFunction set to a function that didn't exist and didn't get any errors.

What am I missing?


Dobromir
Telerik team
 answered on 13 May 2010
9 answers
215 views

I am experiencing some inconsistent behavior with the New Paragraph feature on the Editor.

I did all my tests on your example at: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Editor/Examples/Default/DefaultCS.aspx

On IE:
The ENTER key actually generates a  br  tag.
The button labeled New Paragraph creates a new p tag and places a space in it but places the cursor after the paragraph so if you start typing straight away the words you type are placed outside it and after it, as such:

<p>This is a paragraph</p> 
<p>&nbsp;</p>My new paragraph by clicking on the New Paragraph button 

This happens only if the cursor was placed at the last paragraph in the editor content before the button was clicked.

If another paragraph already exists after the one that the cursor is currently placed and you click on the New Paragraph button a new p tag is correctly added before the next paragraph but the cursor is placed at the beginning of the next one. If you start typing the content is placed on that paragraph leaving the new one in between untouched. There is no way to write in the new one unless you switch to the html view and add some content to the new paragraph in order to make it visible in the edit mode.

On FF:
The ENTER key actually generates a p tag.
The button labeled New Paragraph does absolutely nothing. 

Rumen
Telerik team
 answered on 13 May 2010
1 answer
69 views
Hi,

I'm running into problems when Tooltipifying a RadGrid.

Firstly I have a load on demand RadTreeView - when the user clicks on a node I populate the RadGrid.  That all works fine but I needed to have an asp:UpdatePanel around these in order to prevent a complete postback when a new node is clicked.

I then moved on to Tooltipifying the grid - I was getting some wierd results on mouseovering a row - basically it was doing a full postback and not showing the tooltip properly.

Removing the UpdatePanel has everything working perfectly except that clicking on a different node in the TreeView results in a full postback which I want to avoid.

Anyone got any ideas?

Thanks in advance,

Kirk
Kirk Potter
Top achievements
Rank 1
 answered on 13 May 2010
6 answers
122 views
Hello,
I am using Rad Editor (RadControls for ASP.NET AJAX Q3 2009) for long time and now the requirement is to enable spell check. I do not have any knowledge on how this spell check works and started reading articles related to rad spell in telerik site. 

In my code I clear all the tool bars and add very few one what ever we need. Below are the steps I followed.

1. Added below code and I check see the button for spell check.
void AddSpellCheckerButton() 
        { 
            Telerik.WebControls.RadEditorUtils.ToolbarButton spellCheckButton = new Telerik.WebControls.RadEditorUtils.ToolbarButton( SpellCheckerCommandName ); 
            spellCheckButton.ShowIcon = true
            ValueEditor.Toolbars[ MainToolBarName ].Tools.Add( spellCheckButton ); 
        } 

2. Added Spell folder which has RadSpell.js, SpellCheckService.js and SpellDialog.js to the _RadControls folder in solution. 
3. When I click on spell check Icon, I get below error message.
 "HTTP 404. The resource you are looking for could have been removed, had its name changed, or its temporariry unavailable. 
Requested Url: /_RadControld/Spell/Telerik.Spell.DialogHandler.aspx"

Questions
1. Is this a right way of doing it or not?
2. Do I need to use rad spell and assign rad editor control id? If that's the case how can I make my editor button click call the rad spell?

Any help in this is highly appreciated.

Venki

Venki
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
125 views

how do i create a Dynamic DataTable for RadGrid.

I just follow the same procedure for GridView

DataTable myDataTable = new DataTable();

 

 

 

DataColumn myDataColumn;

 

myDataColumn =

 

new DataColumn();

 

myDataColumn.DataType =

 

Type.GetType("System.String");

 

myDataColumn.ColumnName =

 

"ID";

 

myDataTable.Columns.Add(myDataColumn);

myDataColumn =

 

new DataColumn();

 

myDataColumn.DataType =

 

Type.GetType("System.String");

 

myDataColumn.ColumnName =

 

"TestName";

 

myDataTable.Columns.Add(myDataColumn);

myDataColumn =

 

new DataColumn();

 

myDataColumn.DataType =

 

Type.GetType("System.String");

 

myDataColumn.ColumnName =

 

"ReportResults";

 

myDataTable.Columns.Add(myDataColumn);

myDataColumn =

 

new DataColumn();

 

myDataColumn.DataType =

 

Type.GetType("System.String");

 

myDataColumn.ColumnName =

 

"CommunicationType";

 

myDataTable.Columns.Add(myDataColumn);

 

 

//add test row

 

 

 

 

 

 

 

DataRow drow = myDataTable.NewRow();

 

drow[

 

"ID"] = Guid.NewGuid().ToString();

 

drow[

 

"TestName"] = "TestName1";

 

drow[

 

"ReportResults"] = "ReportName1";

 

drow[

 

"CommunicationType"] = "CommunicationType1";

 

 

 

//Add the row to the datatable.

 

 

 

 

 

myDataTable.Rows.Add(drow);

this datatable is working fine for GridView.
But when i binding for RADGRID, it showing some error like
"

Name is neither a DataColumn nor a DataRelation for table .

"
Any help will be highly appriceated.

Regards,
Suresh Kumar Udatha.

Tsvetoslav
Telerik team
 answered on 13 May 2010
1 answer
75 views

Hi 

I need to get the grid item value thru javascript. The below code is working fine in IE.

 

 

var maxRowIndex = this.ncRadGrid.Grid.get_masterTableView().get_dataItems().length - 1;

 

 

var rowIndex;

 

 

 

for (rowIndex = 0; rowIndex <= maxRowIndex; rowIndex++) {

 

 

 

var nodeID = this.ncRadGrid.GetValue(rowIndex, 'NodeID')
}

 


Please provide the solution for this.

Priya .B
Pavlina
Telerik team
 answered on 13 May 2010
3 answers
182 views
I have an Edit FormTemplate in my Grid that is bound to an OleDb dataset (Access).  On submission of the edit form, control goes to my OnItemCommand routine.  The statement:

GridEditableItem grdSelected = (GridEditableItem)e.Item;
Results in the error:
{"The current EditFormType does not support the requested editing capabilities."}

and I am unable to retrieve the form's data values from their controls.
This same code works fine with a SQL dataset.  Here is my OleDb code that populates the grid:

 

OleDbConnection accConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=//webservice/C$/temp/fcData.mdb");  
OleDbCommand accCommand = new OleDbCommand("select mmw_drug_disp.descdisplay,strength,strengthunit,ddid,dosechekunit, strength+' '+strengthunit as dispdose, mmw_drug_name.descdisplay as drugname, "  
   + "'' as freq, '' as route, '' as comments, null as startdate, null as stopdate, null as dcdate, '' as therapy "  
   + "from mmw_drug_disp "  
   + "inner join mmw_drug_name on  mmw_drug_disp.pnid = mmw_drug_name.pnid "  
   + "where mmw_drug_disp.haspackdrugind=1 and mmw_drug_disp.descsearch like '" + searchtext + "%' order by mmw_drug_disp.descdisplay", accConn);  
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(accCommand);  
accConn.Open();  
DataSet myDataSet = new DataSet();  
myDataAdapter.Fill(myDataSet, "Names");  
 
RadGrid1.DataSource = myDataSet;  
RadGrid1.DataMember = "Names";  
this.DataBind(); 
Thanks for asny suggestions.  Dan

Mira
Telerik team
 answered on 13 May 2010
2 answers
141 views

I am trying to figure out how to apply a custom skin to my radupload control (and progressarea for that matter)

All the examples found on the site refer to a folder I don't have when I install the controls. Additionally it appears that all the skins I can find are actually embedded in the .dll.and not taken from the files.

How do I refer to a skin that is not embedded? It is related to the EnableEmbeddedSkins property, and if so how to refer to the skin path?

Hope you can help me, a simple example should do the trick.

Best Regard

Nikolaj
Basel Nimer
Top achievements
Rank 2
 answered on 13 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?