New row in a DataList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I've got a DataList with for exemple 2 rows in it.
Now I want to add a new row.
How can I do that, without knowing anything of the dataset that was bound to
the datalist?

thanks in advance,

Filip De Backer
 
You pretty much have two choices

A) Bind to a bindable control (the DataList in this case)
B) Create your own display

If you are binding, you will have to add to the DataTable that feeds the
DataView you are binding to (if you are thinking, but I am not using a view,
that just means you have not explicitly declared it and you are letting .NET
create it for you). If you want to continue to add, you will have to cache
the DataSet (or repoll each time) and add the item(s).

If this is not an acceptable option, you can build a table from scratch. To
more easily add items and rebuild with these items, you may want to cache the
current state so it can completely be redrawn correctly.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top