ASP.net add a template field that is also bound

Murray Brown
Murray Brown used Ask the Experts™
on
Hi. The following code is being used in ASP.net to add a boundfield and then a template field.
What code would you use to add a template field that is also bound

      BoundField bfield = new BoundField();
        bfield.HeaderText = "Name";
        bfield.DataField = "Name";
        GridView1.Columns.Add(bfield);
 
        TemplateField tfield = new TemplateField();
        tfield.HeaderText = "Country";
        GridView1.Columns.Add(tfield);

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Developer User Interface
Commented:
Murray BrownASP.net/VSTO Developer

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial