Is it possible to populate asp.net GridView with data and operate on those data without dataBinding, as it is possible with Winforms DataGridView?
+1
A:
You can set the data source to a datatable that you can build up in code with whatever you like.
Here's a link showing how to build a datatable in code...
http://www.aspnettutorials.com/tutorials/controls/data-table-csharp.aspx
You would then add rows to the table and set it to the data source for your gridview.
You can also set a gridview's data source with a list:
http://www.aspnettutorials.com/tutorials/advanced/ilist-interface-aspnet2-vb.aspx
klabranche
2009-12-05 21:05:07
Isn't this databinding? this.GridView1.DataSource = ((DataTable)Session["myDatatable"]).DefaultView;this.GridView1.DataBind();
JMSA
2009-12-05 21:10:39
This is also databinding. Me.GridView1.DataSource = userinfosMe.GridView1.DataBind()
JMSA
2009-12-05 21:14:37
All unbound means to me is that the grid is not operating against a DB for me (insert, update, delete,etc).. I control that not the grid. In the above scenario's I control the grid which is the same in the winforms world to me....
klabranche
2009-12-05 21:18:50