O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a Template Column

When you click the Edit link for a row, by default, the DataGrid control provides editing controls for all the columns within the control that can be edited. As you can see in Figure 17.5, hyperlink values can't be edited. You've seen how to add a detail page and link to that page in order to edit all the columns within a row. What if you'd like to be able to view the ProductName field as a link, but when editing a row, be able to edit the ProductName field on the grid? By default, that's not possible.

The DataGrid control allows you to replace the layout of any column with your own content. That is, you can supply the exact layout information for the content you'd like in the header and footer for the column as well ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required