We help IT Professionals succeed at work.

Html Editor inside ASP.Net Gridview

Rad1
Rad1 used Ask the Experts™
on
I have Gridview and I need to add HTML EDITOR to it such as Ajax Editor.  The Editor needs to replace the textBox that displays when I click on the Edit Gridview.  
The gridview has Edit, Delete, Select control.


I have used the below code to re size the Textbox that displays when I click on Edit, but I am unable to replace the TextBox with the Html Editor control.

Any idea to make it work?

Thank you!

 if ((e.Row.RowState & DataControlRowState.Edit) > 0)
            {
                // Comments
                AjaxControlToolkit.HTMLEditor.Editor comments =    (AjaxControlToolkit.HTMLEditor.Editor)e.Row.Cells[7].Controls[0];
                //comments.TextMode = AjaxControlToolkit.HTMLEditor.Editor.MultiLine;
                //comments.Height = 100;
                //comments.Width = 400;


                // Comments1
                TextBox comments1 = (TextBox)e.Row.Cells[8].Controls[0];
                comments1.TextMode = TextBoxMode.MultiLine;
                comments1.Height = 100;
                comments1.Width = 400;


                // Comments2
                TextBox comments2 = (TextBox)e.Row.Cells[9].Controls[0];
                comments2.TextMode = TextBoxMode.MultiLine;
                comments2.Height = 100;
                comments2.Width = 400;


            }
        }
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Are you putting the Ajax control in the aspx page?  Maybe try the free rich text box.
Ramkisan JagtapLead Developer
Commented:
Please check link below:
http://forums.asp.net/t/1577826.aspx

Hopefully it will help you.
Check below link

http://forums.asp.net/t/1577826.aspx/1

It may helps you.

Author

Commented:
Hi,

I tried the links above but I could not get it to work.

Basically, I need a TextBox that will support link added to it such as www.yahoo.com
It does not have to be html Editor.

Any idea?
Ramkisan JagtapLead Developer
Commented:
you can use any other rich text control like FCKEditor.

Author

Commented:
It has to be small and does it work?

Author

Commented:
Quest if anyone knows:
When I drag and drop the Ajax Editor in VS2010 to the page, nothing happens.
The editor control seams like nothing there?

Any idea?