Groups | Blog | Home
all groups > asp.net datagrid control > november 2005 >

asp.net datagrid control : Dynamically Adding DataLists


Nathan Sokalski
11/6/2005 5:30:07 PM
I have a page on which I want to display several sections each of which
contain a list of names. I have two database tables, one of which contains
the section headings, and the other contains the names and which section
they belong to. I would like to use databinding to display this information,
preferably using DataLists. However, because the number of sections will
vary, the DataLists will need to be added dynamically. But because DataLists
use templates, I do not know how to do this. All of the DataLists will have
identical templates, but I do not know how to create the template when the
DataList is added dynamically. Can someone help me here? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

langdaddy NO[at]SPAM gmail.com
11/6/2005 8:50:13 PM
You can create an array of datalist. you will have to also create a
couple of functions that will return your template columns.

Thanks
Keith Lang
[quoted text, click to view]
AddThis Social Bookmark Button