Avatar of Rad1
Rad1
 asked on

Html Editor inside ASP.Net Gridview

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;


            }
        }
.NET ProgrammingMicrosoft SQL ServerASP.NET

Avatar of undefined
Last Comment
Rad1

8/22/2022 - Mon
kblau

Are you putting the Ajax control in the aspx page?  Maybe try the free rich text box.
SOLUTION
Ramkisan Jagtap

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rad1

ASKER
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?
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rad1

ASKER
It has to be small and does it work?
Your help has saved me hundreds of hours of internet surfing.
fblack61
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rad1

ASKER
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?