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

adding label to autogenerated edit form

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 08 Sep 2011, 01:22 PM
Having trouble adding labels to autogenerated web forms.  When these forms are generated they are generated using table row and table data structures.  I am trying to add a message to the top of the box using FindControl to find the Cancel button, then add a label to the top lvl of the naming container.  How do I add a label outside of the table structure so that it is at the top of the form instead of next to or below the cancel button?

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 13 Sep 2011, 04:13 PM
Hi Jeremy,

Generally, the best approach is to use a templated edit form, since adding controls to autogenerated forms could break their behavior.

However, if you really insist on sticking with autogenerated forms, you could use the ItemCreated event and add the label inside the TableCell's controls collection, as shown in the attached project.


Regards,
Tsvetina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or