Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views
Hello,

I have a rad editor which i want to change its upload and viewpath to a direcotry which is not under my application.
Lets say that my application is at D:\MyWebSites\Site1\
But i want to show a target such as D:\Images\
Because if the target is under my application, when i publish a new version of my site, the image will be deleted.
Here is my code

<telerik:RadEditor ID="txtDescription" runat="server" EnableResize="False" Height="300px" 
                                ToolsFile="~/App_Data/BasicTools.xml" Width="552px" Skin="Default"
                                <Content>                     
                     
                                </Content> 
                                <ImageManager UploadPaths="D:\Images" ViewPaths="D:\Images" /> 
                            </telerik:RadEditor> 

It gives an error that "... is not a valid virtual path". The viewpath can also be something like http://localhost/Images. But i gives the same error.

Regards.


Fiko
Telerik team
 answered on 02 Dec 2009
9 answers
559 views
I have a Rad Grid where the user can create empty rows to populate and save them to the database.  The user can create multiple blank rows and cancel them accordingly.  My code successfully creates the blank rows and maintains existing rows by populating a dataset with the existing rows then creating new empty rows in that same dataset, then rebinds the dataset. 

The problem is that even though after the Cancel icon is clicked and that cancelled row is deleted from the datset, and the grid is rebound and the grid shows the proper rows in debug (the deleted row is gone), for some reason when the page is redisplayed that row that was deleted from the dataset is still there.  It's no longer in Edit Mode but it lingers in the grid like some Ghostly Row of Debugging Past.  I can't find a way to get rid of that row.  But it is defintiely not in the dataset after the last rebind.

The Grid is ajaxed.  Could this be the issue?  How can I force the refresh of the grid after the databind?  This has become a huge time consuming problem and I really hope I can resolve this soon.

Thanks for your help
Sebastian
Telerik team
 answered on 02 Dec 2009
1 answer
137 views
I am a bit confused...

I have a site that is utilizing URL Routing and I want to create a custom image and file dialog that allows me to select file names from a database.  I have already created an image/file management system and I simply want the image/file dialog to read the database as needed and place the links within my content.  The actual delivery of the assets will be handled by my routing protocol (which will deliver actual physical files from the server, not binary information from the database).

I have tried to implement the RadEditorCustomProvider, but I am not sure how to implement it for my needs.

Here is the custom provider, but I have no idea how to call it or fill it with data from by database...

Imports Telerik.Web.UI.Widgets 
 
Namespace RadEditorCustomProvider 
    Public MustInherit Class MyFileBrowserContentProvider 
        Inherits FileBrowserContentProvider 
 
        Public Sub New(ByVal context As HttpContext, ByVal searchPatterns As String(), ByVal viewPaths As String(), ByVal uploadPaths As String(), ByVal deletePaths As String(), ByVal selectedUrl As String, ByVal selectedItemTag As String) 
 
            MyBase.New(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag) 
 
        End Sub 
 
    End Class 
End Namespace 

Can anyone help?
Thanks!!

Mark
Fiko
Telerik team
 answered on 02 Dec 2009
1 answer
168 views



Hi,

I am wondering if anyone can offer any suggestions to resolve an problem I am having.

What I am trying to do: Programmatically create the equivalent of the NodeTemplate (as follows)

<telerik:RadTreeView ...

<Nodes>

<telerik:RadTreeNode>

<NodeTemplate>

some html in here....

</NodeTemplate>

</telerik:RadTreeNode>

</Nodes>


This is an example of the server side code which programmatically adds the nodes to the tree and uses a custom NodeTemplate RadTreeNodeTemplate (see below)

public class RadTreeNodeTemplate : ITemplate

{

private string content;



public RadTreeNodeTemplate(string text)

{

content = text;

}



#region ITemplate Members



public void InstantiateIn(Control container)

{

HtmlGenericControl nodeDiv = new HtmlGenericControl("div");

nodeDiv.Visible = true;

nodeDiv.InnerHtml = content;

nodeDiv.EnableViewState = true;

container.Controls.Add(nodeDiv);

}



#endregion

}

}

Tree building code:

....

RadTreeNode node = new RadTreeNode();

node.Expanded = true;

node.NodeTemplate = new RadTreeNodeTemplate(question.LibraryQuestion.ShortDescription);

node.Value = question.Id.ToString();

parentNode.Nodes.Add(node);

....

The problem is with the programmatically generated nodes cause client-side errors when you mouse over them when they have html content.

a.RadTreeNode.prototype={set_element:function(c){this._element=c;

this._element._item=this;


I figure the html rendered isn’t quite correct... What should I have my RadTreeNodeTemplate (custom ITemplate)

Any help would be greatly appreciated.

Cheers Michael

Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
212 views
Hi,

I am using radtreeview in my application, in the nodeclick event,

radtreeview.slectednode.value gives null reference exception.

what should i do.

<telerik:RadTreeView ID="RadTreeView1" runat="server" ShowLineImages="False" CheckBoxes="True"  OnNodeClick="RadTreeView1_NodeClick">
 </telerik:RadTreeView>

 protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        try
        {
            string str = RadTreeView1.SelectedNode.Value;
        }
        catch
        {
        }

        Response.Redirect("member.aspx?member=" + str);
    }

thanks,
mano
Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
142 views
Hi,

I'm trying to find a way to utilise the ".set_html" javascript call to obviously set the content of the editor on a postback (or client-side). I'm using a RadGrid which is holding versions of content with a selecting button which fires a 'SelectedIndexChanged' event - this is where I am attempting to set the html of the editor by calling the following:

 

 

Page.ClientScript.RegisterClientScriptBlock(Me.GetType"setversion""javascript:setContent('" + txtDescription.UniqueID + "','" + RadEditor1.UniqueID + "');"True

The function is here:

<script type="text/javascript" language="javascript">  
    function setContent(textbox,editor)  
    {  
        $find(editor).set_html($get(textbox).value);  
    }  
</script> 

Is this possible to do? If I'm heading in the wrong direction any advice would be greatly appreciated.

Thanks

 

Rumen
Telerik team
 answered on 02 Dec 2009
1 answer
135 views
Hi,

I use the tabstrip with usercontrols- load on demand:
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultvb.aspx

I want to use this inside a form with validation.
On every tab, there are different form elements, and each of them has to be validated, if AND ONLY IF the user has seleceted the tab.
When a user clicks on every tab, they get loaded to the system, and the form validation fires on every tab.
- The validation should of cause only happen on the the form elements for the selected tab.
How can this be done?

I believe i don't need to send code? - I have form on the master page, some form elements on the master page, and different form elements on the usercontrols -pages.

Any ideas?
thanx.

best regards,
Frank



Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
150 views
When manually adding data to a grid, the first two columns go missing.
See attached Bitmap and code below.
I am simply adding data to a Grid through via a table.
DataTable dt = new DataTable();     
  for (int i = 0; i < 5; i++)     
   dt.Columns.Add(new DataColumn("Col: " + i.ToString(), typeof(string)));     
  for (int i = 0; i < 5; i++)     
  {     
   DataRow dr = dt.NewRow();     
   dt.Rows.Add(dr);     
  }     
  RadGrid1.DataSource = dt;     
  RadGrid1.Rebind();     
  for (int i = 0; i < 5; i++)     
   for (int j = 0; j < dt.Columns.Count; j++)     
    RadGrid1.Items[i].Cells[j].Text = j.ToString();    
 
I thought this was going to be simple, but has turned into something a little more challenging.
Any thoughts?
Thanks,
HH
Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
3 answers
142 views

Hello,

I have a RadGrid created at runtime columns , commandItem...everything

How can i access the form/container to add some control also in runtime?

I mean , i'd like to add some controls after the buttons update/insert/cancel when i edit/insert a record in grid (  MasterTableView.EditMode = GridEditMode.EditForms;)

Thanks in advance

Gilberto
Johny
Top achievements
Rank 1
 answered on 02 Dec 2009
6 answers
704 views
Hi guys,

I'm often get the "Element '[xxx]' is not a known element"-warning in VS 2008.

I have added the line beneath, the site built and all works fine, but there is just no intellisense.

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

I've found the thread which probably should be the same problem, but since it is recommend in another thread (which I can't found now) not to do it this way and I besides this doesn't know where to find my PublicKeyToken, I wan't to hear if there are any other ideas.

Some times the intellisens is there and some times it isn't.
Kevin
Top achievements
Rank 2
 answered on 02 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?