Hi Fabiano,
As for the unbounded datagrid, here are my suggestions:
The WebForm DataGrid, DataList or Repeater controls are all DataBound
Template controls which will render all its items according to the
DataSource it has been binded. We only set the template (such as
ItemTemplate, AlternatingTemplate, EditTemplate...) . Then at runtime, the
control loopthroug its datasource( DataTable or Array or ...) and generate
the actual html contents. So we must specify a datasource. You may have a
look a the following link for detailed mechanism of DataBound Template
ASP.NET server control:
#Building DataBound Templated Custom ASP.NET Server Controls
http://msdn.microsoft.com/library/en-us/dnaspp/html/databoundtemplatedcontro
ls.asp?frame=true
As my opinion, I think you can implement your requirement via the following
means:
Bound the Template DataBound control with a certain DataSource. For
example, a datatable, then you can programatically generate the datatable
and then bind it at runtime. When you want to change the DataGrid, you
modify the DataTable's records and rebind it to the DataGrid. How do you
think of this?
If you have anything unclear, please feel free to post here. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx