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

Autogenerated Edit Form - Hide Label

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
STEPHEN
Top achievements
Rank 1
STEPHEN asked on 13 Nov 2010, 12:53 AM
How do I hide the label on the autogenerated edit form?  Here's my code, It hide's the textbox but not the label in fornt of the textbox.

'Hide the planID on the automatic edit form
        If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
        Dim editItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
        Dim txtbxPlanID As TextBox = DirectCast(editItem("PlanID").Controls(0), TextBox)
        txtbxPlanID.Visible = False
        End If

Can I add validation to the autogenerated edit form?

Also, does anyone have a recent code sample for using an external control as an edit form. I have tried to follow this along but I get confused because I am using a sql data source and a clean example with a standard datastore would help me learn much more.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

2 Answers, 1 is accepted

Sort by
0
STEPHEN
Top achievements
Rank 1
answered on 14 Nov 2010, 05:48 PM
Nevermind, I figured it out. It is done by simply setting the ReadOnly field on the column.  I had to go back and adjust the Update SQL because it was sending the readonly fields back to the table as null values.  Once I took the readonly fields out of the update statement it worked fine.

I would still like to see sample code for using an external control as an edit form using a sql datasource.  Thanks. 
0
Princy
Top achievements
Rank 2
answered on 15 Nov 2010, 10:47 AM
Hello Stephen,

Please take a look at the following Demo which explains how to perform edit/update/delete/insert operations in RadGrid using an external form.
Grid / Editing with external form

Hope this helps,
Princy.
Tags
Grid
Asked by
STEPHEN
Top achievements
Rank 1
Answers by
STEPHEN
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or