Instructor-led online courses in ASP.NET Core, ASP.NET MVC, and ASP.NET Design Patterns. Conducted by Bipin Joshi on weekends. More details are available here.

Creating DataGrid Programmatically

Introduction

Generally ASP.NET DataGrid is placed on the web form at design time. You add the <asp:DataGrid>
control to the web form and then add bound columns to it. However, some times
it becomes necessary to create DataGrid via code and then add it to the web form. This articles will show
you how to do just that.

Steps

In order to create DataGrid programmatically you need to follow following
steps

Create a new VS.NET project or if you prefer to code in a text editor
create a .aspx file

Bipin Joshi is a software consultant, trainer, author and spiritual yoga mentor having 23+ years of experience in software development. He teaches online training courses in ASP.NET Core, ASP.NET MVC, and Design Patterns to individuals and small groups. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced the Yoga way of life he also teaches Ajapa Yoga to interested individuals. To know more about him click here.