How to Bind a gridview to a datatable without a tableAdapter
-
Hi, I'm new to web development and asp.net and can't figure this one out. I've manually created a datatable in my dataset.xsd page and now I want to bind a gridview to that datatable. I need to do this so I can design the gridview at design time and manipulate it at runtime. I will be populating the datatable at runtime as well. I can't see how to create a suitable datasource to link to the table? Can someone point me in the right direction please. Obviously I'm coming from a forms background. Thanks.
Glen Harvy
-
Hi, I'm new to web development and asp.net and can't figure this one out. I've manually created a datatable in my dataset.xsd page and now I want to bind a gridview to that datatable. I need to do this so I can design the gridview at design time and manipulate it at runtime. I will be populating the datatable at runtime as well. I can't see how to create a suitable datasource to link to the table? Can someone point me in the right direction please. Obviously I'm coming from a forms background. Thanks.
Glen Harvy
Hi, using a Gridview "id" to bind the data. For example, GridviewID.DataSource = ObjectDataTable; GridviewID.DataBind();