473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DetailsView Problem

Hello,
I have a little problem with a DetailsView:
I bound it to a datasource and I enabled
the capability of adding new records,
and everything goes right if I there is
one or more records into my DataSource.

But if the recordset is empty
the "new" button doesn't render,
is it right?

How can I avoid this (I have to add new
records even if the recordset is empty)

Thanks!
M.A.
Mar 21 '06 #1
2 1217
Maury,

I would check if you have an empty recordset and in that case manually show
the new button. Or you may want to try setting the default value of the
details view. Otherwise I think that with nothing being passed to it from a
gridview it just won't appear at all.

Sincerely,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Maury" <ma*********************@gmail.com> wrote in message
news:ve*********************@twister1.libero.it...
Hello,
I have a little problem with a DetailsView:
I bound it to a datasource and I enabled
the capability of adding new records,
and everything goes right if I there is
one or more records into my DataSource.

But if the recordset is empty
the "new" button doesn't render,
is it right?

How can I avoid this (I have to add new
records even if the recordset is empty)

Thanks!
M.A.

Mar 21 '06 #2
S. Justin Gengo <justin ha scritto:
Otherwise I think that with nothing being passed to it from a
gridview it just won't appear at all.

Yes, this is the problem, but I think that this isn't a good thing...
A better rendering should be having a properties like
'ShowAddNewEvenIfDataSourceIsEmpty'

:-|
Thanks
Maury

Mar 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
3
by: chrisn | last post by:
Hi, (Using ASP.Net 2.0) I have a wizard control inside a detailsview control. When I attempt to call the InsertItem method on the DetailsView I get an error "ObjectDataSource...
0
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a...
0
by: mike | last post by:
Hi, When I programatically Bind a DataSource to DetailsView it does not fire "ModeChanged" event. This is first time i am trying to use ASP.NET DetailsView control. I have played with some of the...
0
by: wardemon | last post by:
Hi All, I have a Master(GridView) / Detail(DetailsView) page scenario. When one clicks on a row in the GridView, the DetailsView will be filled-up with related data. My problem is that,...
2
by: mike | last post by:
I have a page with a LoginView which contains a Gridview and a DetailsView, each in its own UpdatePanel The problem that I am experiencing is that when I select a record in the Gridview (using a...
0
by: sansie | last post by:
Hi, I have a page which is basically a details view(in inset mode) inside a datalist. The problem is I want to set the field "invoiceID" (of the detailsview) to an invoiceID coming through the...
0
by: Andreas Wöckl | last post by:
HI Group! I am really getting crazy with my DetailsView. I have the following code initializing the Page where the DetailsView is in it: If Session("firmaNr") = 0 Then...
3
by: =?Utf-8?B?QW5nZWw=?= | last post by:
I seem to understand how the control works as long as I mated to SqlDataSource or ObjDataSource it works fine. But I do not want to flatten my design in this manner. I am interested in how I can...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.