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

asp.net datagrid control : Detailsview empty dataset insert


Eric Zhao
8/30/2005 12:00:00 AM
My details view is in insert mode and my dataset is empty but the details
view doesnt show.

who can help me, how to do?

Also I tried to set the defaultmode to insert mode, but i found i can't
cancel the inserting.

thanks in advance.


Brock Allen
8/30/2005 8:57:15 AM
What DataSource control are you using? The problem is that the DetailsView
needs to know a 'template' of what the insert data should be, so it calls
the SelectMethod to get an example of what to automatically build for ther
insert. If you're using an ODS and your select method returns null then the
DetailsView has no idea what fields to make available.

The other solution is to build the InsertTemplate for each value manually.

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


AddThis Social Bookmark Button