Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
126 views
Hello,

We are having some problems installing/configurating RadEditor for MOSS 2007. What we've done so far:

- Extend site with ASP.NET 3.5
- Deployed RadControls
- Installed RadEditor using Teleriks' .wsp file
- Deployed RadEditor solution
- Incorporate RadEditor in the PageLayouts (replacing richhtmlfield for radhtmlfield)

Everything seems to work (no errors), but when we view the RadEditor something seems to be wrong with the layout as seen in the attached screenshot.

What can this be?

Regards,

Torben Sonnemans
Torben
Top achievements
Rank 1
 answered on 13 Oct 2010
3 answers
129 views
Hi,

I am binding my grid to a sorted view which is sorted on column A in Ascending order like this:
DataTable1.DefaultVew.Sort  = "A ASC";
RadGrid1.Datasource = DataTable1.DefaultView.ToTable();

The grid should look like this as the sorting is done by col A:
A (datetime)    B(string)     C(string)
10 AM                  xxx                Meeting
11 AM                  xxy                Call
2 PM                    xyx                Project
3 PM                    zxx                Appointment

Somehow after I bind the grid the sorting is changing to be sorted in Ascending order by col C.The grid is being rendered as:
A (datetime)    B(string)     C(string)
3 PM                    zxx                Appointment
11 AM                  xxy                Call
10 AM                  xxx                Meeting
2 PM                    xyx                Project

I have allowsorting set to false for the grid.
Could you tell me what's wrong here.
Dimo
Telerik team
 answered on 13 Oct 2010
6 answers
130 views
I need to do something that seems like it shouldn't be that difficult, but I can't seem to figure out how to do it effectively, but I am fairly new to these controls.

The scenario is that I have a custom control that basically wraps the file explorer with image preview demo and paging is enabled for the grid. I want to be be able to move the page to the selected item (single select only). Right now, the item that is selected when the control first comes up is set using the InitialPath property of the file explorer, but it always opens on page 1. If I scroll through the pages, when I get to the page with the selected item, it is selected and the image preview happens. Great, but I want to do that programmatically.

I have tried a number of different approaches, but they have not yielded anything. Can someone give me some tips or a pointer to some code that could be adapted to do this? I have looked in the demos, forum and code library, but didn't find anything that really addressed this.

Thanks in advance.
Fiko
Telerik team
 answered on 13 Oct 2010
1 answer
116 views
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      If Not Page.IsPostBack Then
 
  ap.ResponseScripts.Add("radalert('Thank you for your registration.')")
 
 
  End If
 
  End Sub

Is it possible to call radalert using the code above in page_load?
The page has JS error.
If not, what is the correct way?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 13 Oct 2010
2 answers
140 views

Hello,

Can you copy and paste values from 1 cell to another cell using the grid?

Any help appreciated.  Thanks in advance

Daniel
Telerik team
 answered on 12 Oct 2010
2 answers
169 views
Hello,

We have a particular situation in which I need to generate a response entirely server-side via Response.Write. We are using Telerik's embedded copy of jQuery and in this particular response, I need to include the jquery script. Doing a bit of investigation, I came up with this:

Response.Write("<script type='text/javascript' src='" + Request.ApplicationPath + "/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d1.0.61025.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f0f78f9-0731-4ae9-b308-56936732ccb8%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3ad89f6e67-3ab0-4fcf-b5f1-b51b735ae3d9%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3aaa288e2d'></script>");

Not pretty and seems a bit unreliable. I tried to instantiate a RadScriptManager control server-side, add the core scripts programmatically and then call RenderControl on the manager object, but couldn't get around an exception thrown stating that the control must be inside of a <form runat="server">.

Is there a better way of doing this? Cleaner and standardized? What are the parameters for the Telerik.Web.UI.WebResource.axd?

Thanks,

Mike Oliver
Infotrieve, Inc.
Mike
Top achievements
Rank 1
 answered on 12 Oct 2010
1 answer
158 views
What would be the correct CSS code to use to have the text color of the main root menu change when the menu is moused over and while hovering over the sub-items?

Right now I'm using this to set the color to white:

.RadMenu a.rmLink
{
    cursor: default;
    display: block;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #ffffff;
    
}

and I want the color to change to black (#000000) while that menu is open. Thanks!
Adam sharpe
Top achievements
Rank 1
 answered on 12 Oct 2010
3 answers
70 views

CommandItemSettings

 

 

ExportToPdfText="Export to Pdf"

 



Whenever I use the designer it keeps putting that in..

Furthermore.. Id actually like that functionality
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EntityDataSource1" AutoGenerateEditColumn="True"
           Width="500px" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand"
           AutoGenerateColumns="False" AllowFilteringByColumn="True" AllowPaging="True"
           AllowSorting="True" GridLines="None" ShowGroupPanel="True">
           <ClientSettings AllowDragToGroup="True">
           </ClientSettings>
           <MasterTableView DataSourceID="EntityDataSource1" DataKeyNames="OrgID" CommandItemDisplay="Top">
               <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
               <Columns>
                   <telerik:GridBoundColumn DataField="OrgID" HeaderText="OrgID" ReadOnly="True" SortExpression="OrgID"
                       UniqueName="OrgID" DataType="System.Int32" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="OrgName" HeaderText="OrgName" SortExpression="OrgName"
                       UniqueName="OrgName">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                       UniqueName="Address" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                       UniqueName="City">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                       UniqueName="State">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" SortExpression="Zip" UniqueName="Zip"
                       Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" SortExpression="Phone"
                       UniqueName="Phone" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" SortExpression="Fax" UniqueName="Fax"
                       Visible="false">
                   </telerik:GridBoundColumn>
               </Columns>
           </MasterTableView>
       </telerik:RadGrid>
       <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=G3TEntities"
           DefaultContainerName="G3TEntities" EnableFlattening="False" EnableInsert="True"
           EntitySetName="Orgs" EnableUpdate="True">
       </asp:EntityDataSource>
but I don't see any 'Export to PDF' on my radgrid.. what else do I need to add?
Daniel
Telerik team
 answered on 12 Oct 2010
3 answers
163 views

Hi,

I'm currently using the RadEditor to update html content added into a Gridview. I modified the sample code but it doesn't work the same? How it works is the person can add their content, visually with all the styles of bold, red text, etc. Then submit that to the database. If they want to edit that html page, they just go to the Gridview, click edit, and the content from the grid will populate the editor where they can edit it, again visually, and then resubmit overwriting the content that's there. My problem is I can submit to the database but I can't pull it back out meaning edit doesn't work nor does delete? Here's the code:

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports Telerik.Web.UI
Imports System.Data.SqlClient
Imports System.IO

Partial Class _Default
    Inherits System.Web.UI.Page

 

    ' Important!!! The method is called AFTER Page_Load method is executed, so make sure you do not
    ' inadvertently overwrite the editor content there before you process it here!
    Public Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click

        Dim connection As SqlConnection = CreateConnection()
        Dim command As SqlCommand = Nothing

        If EditedNews.Value <> String.Empty Then
            command = New SqlCommand("UPDATE ElectPageEditor SET NewsDate = GETDATE(), NewsText = @NewsText WHERE NewsID = @NewsID", connection)
            command.Parameters.AddWithValue("@NewsText", NewsEditor.Content)
            command.Parameters.AddWithValue("@NewsID", Convert.ToInt32(EditedNews.Value))
        Else
            command = New SqlCommand("INSERT INTO ElectPageEditor (NewsDate, NewsText) VALUES (GETDATE(), @NewsText)", connection)
            command.Parameters.AddWithValue("@NewsText", NewsEditor.Content)
        End If
        Try
            connection.Open()
            command.ExecuteNonQuery()
        Catch ex As Exception
            lblError.Text = "Error in submit form for " & ex.Message
        Finally
            connection.Close()
        End Try

        Me.Response.Redirect(Me.Request.Url.PathAndQuery)
    End Sub

    Private Function CreateConnection() As SqlConnection
        Dim _connectionString As String = ConfigurationManager.ConnectionStrings("VRASConnectionString").ConnectionString
        Return New SqlConnection(_connectionString)
    End Function

    Protected Sub ReadAllRecords()
        Dim connection As SqlConnection = CreateConnection()
        Try
            connection.Open()
            Dim command2 As New SqlCommand("SELECT NewsID, NewsDate, NewsText FROM ElectPageEditor", connection)
            NewsGrid.DataSource = command2.ExecuteReader()
            NewsGrid.DataBind()
        Catch ex As Exception
            lblError.Text = "Error in application " & ex.Message
        Finally
            connection.Close()
        End Try
    End Sub

    Protected Sub NewsGrid_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles NewsGrid.RowCommand
        Dim connection As SqlConnection = CreateConnection()
        Dim row As GridViewRow = TryCast(NewsGrid.Rows(e.CommandArgument), GridViewRow)
        NewsGrid.DataKeys(row.RowIndex).Value.ToString()
        If e.CommandName = "Delete" Then
            Dim com As New SqlCommand("DELETE FROM ElectPageEditor WHERE NewsID = @NewsID", connection)

            com.Parameters.AddWithValue("@NewsID", row.Cells(0).Text)
            Try
                connection.Open()
                com.ExecuteNonQuery()
            Catch ex As Exception
                lblError.Text = "Error running command. " & ex.Message
            Finally
                connection.Close()
            End Try
        ElseIf e.CommandName = "Edit" Then
            Dim command As New SqlCommand("SELECT NewsText FROM ElectPageEditor WHERE NewsID = @NewsID", connection)
            command.Parameters.AddWithValue("@NewsID", row.Cells(0).Text)

            Try
                connection.Open()
                Dim record As SqlDataReader = command.ExecuteReader(CommandBehavior.CloseConnection)
                If record.Read() Then
                    NewsEditor.Content = record.GetString(0)
                    EditedNews.Value = row.Cells(0).Text
                Else
                    NewsEditor.Content = ""
                    EditedNews.Value = ""
                End If

                ' Will close the connection as well
                record.Close()
            Catch ex As Exception
                lblError.Text = "Error modifying information. " & ex.Message
            Finally
                connection.Close()

            End Try
        End If
        ' Add code to delete row from data source.
        ReadAllRecords()
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            ReadAllRecords()
        End If

    End Sub
End Class

Paul Rickard
Top achievements
Rank 1
 answered on 12 Oct 2010
2 answers
82 views
Hi there,

Im using the RadChart Control with the line Type but i have a problem i need that  LineSeriesAppearance-PenStyle be diferent for all series and not to repeat the style , what i tried to say :

Serie 1 : Dotted
Serie 2: Dash
Serie 3 DashDot
Serie 4.....

Minimun i need 6 diferents styles;please  how can i configure the custom property or another property like this to do it  ?

Regards
Carlos.
Carlos
Top achievements
Rank 1
 answered on 12 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?