GridHtmlEditorColumn background colour

3 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 31 Oct 2012 Link to this post

    I am using this editor column, and it is inheriting the page css. This is OK except that I want to over-ride the 
    background color so that the text area has a plain white background.  Just setting the item background color property does not seem to do it.
    I am sure I am missing something simple! Please help!


  2. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 01 Nov 2012 Link to this post

    OK ,  after following a few threads I have finally used this approach, which works for the insert and edit modes:
    Protected Sub RadGrid1_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
            If e.Item.IsInEditMode AndAlso (TypeOf e.Item Is GridEditFormItem) Then
                Dim gridEditFormItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
                Dim radEditor As RadEditor = DirectCast(gridEditFormItem("Body").Controls(0), RadEditor)
                radEditor.ContentAreaCssFile = "../css/editor.css"
                radEditor.Height = Unit.Pixel(750)
                radEditor.Width = Unit.Pixel(600)
            End If
        End Sub

    The only snag is that the default green page background shows up again in the 'preview' mode. I tried "e.item.isinpreviewmode" approach but that is not valid!  

    Can someone help?  There must be a simple answer!


    P.S using Q2 2010 release 4.0
  3. Rumen
    Rumen avatar
    14324 posts

    Posted 02 Nov 2012 Link to this post


    Replace this line radEditor.ContentAreaCssFile = "../css/editor.css" with


    For more information see this article: Content Area Appearance Problems.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top