Groups | Blog | Home
all groups > asp.net building controls > december 2003 >

asp.net building controls : Custom Template in Datalist


Mike Oblivious
12/16/2003 4:06:16 PM
Datalists are great for viewing, selecting, and editing
data in an organized format. But what do I do if I want
to add a new record?

Conceptually, one should be able to click a "New" button
and be presented with a blank record that they can enter
data into, click "save" and then have the record inserted
into the recordsource.

I'm guessing that the best way to do this would be to
create a custom control version of the datalist that
includes an additional NEW template that I can format
along with the existing EDIT and SELECT templates.

Any ideas on how to write the control that will do this
or where there are articles that show how? TIA

Teemu Keiski
12/17/2003 10:45:13 PM
Hi,

couldn't you make such inserting capability using the <HeaderTemplate>

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


[quoted text, click to view]

geopavlov NO[at]SPAM yahoo.com
12/19/2003 2:42:56 PM
i don't really see a need for a special control. just put an "add new"
button in the header and/or footer, which inserts a new blank item
into the datalist and then immediately turns in-place editing on for
that item. from then on you have a standard in-place editing scenario.

AddThis Social Bookmark Button