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.HTMLEdi tor.Editor comments = (AjaxControlToolkit.HTMLEd itor.Edito r)e.Row.Ce lls[7].Con trols[0];
//comments.TextMode = AjaxControlToolkit.HTMLEdi tor.Editor .MultiLine ;
//comments.Height = 100;
//comments.Width = 400;
// Comments1
TextBox comments1 = (TextBox)e.Row.Cells[8].Co ntrols[0];
comments1.TextMode = TextBoxMode.MultiLine;
comments1.Height = 100;
comments1.Width = 400;
// Comments2
TextBox comments2 = (TextBox)e.Row.Cells[9].Co ntrols[0];
comments2.TextMode = TextBoxMode.MultiLine;
comments2.Height = 100;
comments2.Width = 400;
}
}
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.HTMLEdi
//comments.TextMode = AjaxControlToolkit.HTMLEdi
//comments.Height = 100;
//comments.Width = 400;
// Comments1
TextBox comments1 = (TextBox)e.Row.Cells[8].Co
comments1.TextMode = TextBoxMode.MultiLine;
comments1.Height = 100;
comments1.Width = 400;
// Comments2
TextBox comments2 = (TextBox)e.Row.Cells[9].Co
comments2.TextMode = TextBoxMode.MultiLine;
comments2.Height = 100;
comments2.Width = 400;
}
}
Are you putting the Ajax control in the aspx page? Maybe try the free rich text box.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It has to be small and does it work?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
When I drag and drop the Ajax Editor in VS2010 to the page, nothing happens.
The editor control seams like nothing there?
Any idea?