This is a migrated thread and some comments may be shown as answers.

Borders on Tables

5 Answers 191 Views
Editor
This is a migrated thread and some comments may be shown as answers.
arich
Top achievements
Rank 1
arich asked on 19 Dec 2007, 10:04 PM
I'm having the problem where, in design mode, I'm not seeing the borders around tables.  The Show/Hide Border button has no affect on this.  Any ideas what I need to do to fix this?  Thanks.

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Dec 2007, 09:14 AM
Hello Arich,

Are you able to reproduce the problem with the Default example of RadEditor?

The problem could be related to some global style for TABLE, TR, TD elements that is overriding the TABLE style that the editor applies to the inserted tables in Design mode. Please, remove your css stylesheet from your page and see whether the problem still persists.

If you are not able to solve the issue, please open a support ticket and send a sample runnable project that demonstrates the problem. I will examine it and try to provide a solution.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
arich
Top achievements
Rank 1
answered on 26 Dec 2007, 04:34 PM
After doing a bit more research it appears that assigning my stylesheet to here (ContentAreaCssFile="~/My.css") causes the problem.  I had been assigning it to there and to <CssFiles><telerik:EditorCssFile Value="~/My.css" /></CssFiles> to compensate for strange styles showing up in the Assign Style list.  That appears to be fixed now though.
0
Lini
Telerik team
answered on 27 Dec 2007, 11:36 AM
Hello,

The table borders are part of the editor's default content area css file. If you set the ContentAreaCssFile property, then you are overriding the default setttings and the table borders will not be visible. As you already found out, you can use the CssFiles collection to control which styles are applied to the editor content area and are visible in the Apply Class dropdown list.

Greetings,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Matt Francis
Top achievements
Rank 1
answered on 08 Jan 2009, 03:11 PM
Is there anyway to control the show/hide borders through codebehind, C#?
0
Rumen
Telerik team
answered on 12 Jan 2009, 12:22 PM
Hi Matt,

If you set the ContentAreaCssFile property to point to an empty css file, you will hide the table borders, because the default content area styles will be not applied to the editor's content area. Here it is a sample example demonstrating how to hide / show the table borders on a server button click, e.g.

Default.aspx

<telerik:RadEditor ID="RadEditor1" runat="server" >
 <Content>
     <table>
     <tbody>
        <tr>
            <td>111 </td>
            <td>222 </td>
        </tr>
        <tr>
            <td>333 </td>
            <td>444</td>
        </tr>
     </tbody>
    </table>
 </Content>
</telerik:RadEditor>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"/>

Default.aspx.cs

    private bool Flag
    {
        get
        {
            if (ViewState["Flag"] == null)
            {
                return true;
            }
            return (bool)ViewState["Flag"];
        }
        set { ViewState["Flag"] = value; }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Flag)
        {
            Flag = !Flag;
            RadEditor1.ContentAreaCssFile = "~/empty.css";
        }
        else
        {
            Flag = true;
            RadEditor1.ContentAreaCssFile = "";
        }
    }
   
Greetings,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
arich
Top achievements
Rank 1
Answers by
Rumen
Telerik team
arich
Top achievements
Rank 1
Lini
Telerik team
Matt Francis
Top achievements
Rank 1
Share this question
or