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

Manually Controlling Templating Through Codebehind?

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Taylor
Top achievements
Rank 1
Taylor asked on 09 Apr 2009, 01:16 PM
Is there a way to achieve some of the same templating performed with <ItemTemplate>, but in the code-behind?

Problem is that I have some fields that may or may not be available and doing a simple Eval( "SomeField" ) will throw an exception.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Apr 2009, 06:53 AM
Hello Taylor,

In order to create the desired template in code-behind, you should define a class which implements the ITemplate interface.
Programmatic creation

Best regards,
Daniel
the Telerik team

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