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

[Solved] Using RadEditor in WebControl triggered by RadGrid Event - DB Update Problems

3 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Richard asked on 15 Jan 2008, 09:38 AM

Admission:
I'm a brand new user of the product line and decided to start off with Prometheus rather than using the established RAD product line -- that may well have been a mistake. 

Setup:
RadGrid in primary ASPX page (UpdateContent.aspx) and is populated using a simple SQLServer 2005 query.  The RadGrid Select event calls an ASCX file (ContentEditControl.ascx) which contains a couple of text boxes and a RadEditor.    I want to edit the grid row dataitems using the web control.
I understand that the update procedure must be part of UpdateContent.aspx (where the RadGrid resides).

What works:
1.  The ContentEditControl textboxes and RadEditor are populated with the correct values.
2.   Values can be edited.
3.   The Update button triggers properly and can be trapped in UpdateContent.ASPX.RadGrid1_ItemCommand

From there, the next steps are to obtain the new values and update the database.

What I could use some help with:
1.  I can not see how to use FindControl to locate the ContentEditControl's textbox and RadEditor controls and text values.  

    Could you provide a quick VB example?

2.  Example content obtained from the RadEditor includes lines like: <h5><p>TextHere</p></h5>  

    Is there an integrated method to cleaning that up or do I need to devise one?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 2
answered on 15 Jan 2008, 12:43 PM

Updates:
Regarding Question 1, I tried to follow the tutorial examples shown on Page 209-210 (VB example)  without great success. Please note:

  1. Import statements should not end in semicolons ";"
  2. Line: Protected Function collectFormData(ByVal e As Telerik.WebControls.GridCommandEventArgs) As Hashtable Produces Telerik.WebControls.GridCommandEventArgs is not defined VS error

Question 2:  I see a button which will manually clean HTML code.  In my case, the end user isn't familiar enough with HTML to know what's right, wrong, good, etc....

Thank you.


0
Rosen
Telerik team
answered on 17 Jan 2008, 01:37 PM
Hello Richard,

You can find more information about how to use custom webcontrol as an update form in online documentation at this location, and a  working example can be found here.

To get RadEditor's Content without html tags you can use Text property.

The examples in Self-paced Tutorial book is targeting classic RadControls. Therefore control's namespaces are different.

All the best,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Richard
Top achievements
Rank 2
answered on 17 Jan 2008, 03:08 PM
Thank you.  I shall look at these.
For the time being, I've completely abandoned Prometheus controls and am using the more traditional RadControls for ASP.NET.   The results are much more even and predictable and I can move ahead in my own assignments.   I bought this system so that I could produce better products of my own.
I hope to re-examine Prometheus after it's had the chance to achieve greater stability and documentation.
Tags
Grid
Asked by
Richard
Top achievements
Rank 2
Answers by
Richard
Top achievements
Rank 2
Rosen
Telerik team
Share this question
or