troubleshooting Question

Html Editor inside ASP.Net Gridview

Avatar of Rad1
Rad1 asked on
Microsoft SQL Server.NET ProgrammingASP.NET
9 Comments5 Solutions1648 ViewsLast Modified:
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;


            }
        }
ASKER CERTIFIED SOLUTION
Ramkisan Jagtap
Lead Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 5 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros