473,795 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detailsview adding first record

HI,
I have a asp 2.0 page that has a sqldatasource and a detailsview i have
enabled the inserting updating deleting in the datasoure. I have a blank
table that has no records. I run the page.. I get a blank page how can I
toggle the detailsview to show the new insert form if it has no records
returned? So I can insert the very first record into the system.
Nov 19 '05 #1
2 1903
Ok.... since there has been no comment makes me wonder if i did not give
enough info.. And I am wondering to myself is this becase there is no
autonumbered ID field in the table, I wanted to make my own id and not a auto
generated one, but thinking I should but in a second key and maybe this will
get solved? If you need to see what i am talking about created a new table
with no record and only a key that is not an autonumber then start a web
project in vs 2005 beta 2 and a new asp.net page then add a sqldatasourse to
that table with insert add delete on and insert a detailsview control into
that and link it to the datasoure and run the page..
its blank no fields no way to select new for new record etc...

Please Help!

"TdarTdar" wrote:
HI,
I have a asp 2.0 page that has a sqldatasource and a detailsview i have
enabled the inserting updating deleting in the datasoure. I have a blank
table that has no records. I run the page.. I get a blank page how can I
toggle the detailsview to show the new insert form if it has no records
returned? So I can insert the very first record into the system.

Nov 19 '05 #2
Found it its the Default View property.

"TdarTdar" wrote:
Ok.... since there has been no comment makes me wonder if i did not give
enough info.. And I am wondering to myself is this becase there is no
autonumbered ID field in the table, I wanted to make my own id and not a auto
generated one, but thinking I should but in a second key and maybe this will
get solved? If you need to see what i am talking about created a new table
with no record and only a key that is not an autonumber then start a web
project in vs 2005 beta 2 and a new asp.net page then add a sqldatasourse to
that table with insert add delete on and insert a detailsview control into
that and link it to the datasoure and run the page..
its blank no fields no way to select new for new record etc...

Please Help!

"TdarTdar" wrote:
HI,
I have a asp 2.0 page that has a sqldatasource and a detailsview i have
enabled the inserting updating deleting in the datasoure. I have a blank
table that has no records. I run the page.. I get a blank page how can I
toggle the detailsview to show the new insert form if it has no records
returned? So I can insert the very first record into the system.

Nov 19 '05 #3

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

Similar topics

1
10073
by: Shawn Wildermuth | last post by:
I have a *single* SqlDataSource that loads up a single result set that I show in a GridView. In the GridView, i've added a "Select" button and handling the SelectedItem event. I also have a DetailsView (though FormView has this same issue) where I want to be able to set the current item to bind to from the DataSource. All the examples I've seen use two data sources and on every *select* they do another round-trip to the Database (which...
12
8706
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 update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
0
1248
by: Seok Bee | last post by:
Dear Experts, In my web application, I have a Master/Detail display of records using Gridview and DetailsView controls. Whenever, I made a selection of a record from the Gridview control, the detail information of the record will be displayed in the DetailsView control. Information in the editable in the detailsview by allowing user to have the edit option. On top of that I also allow user to add new record through the detailsview...
0
1874
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 GridView - each row has an edit button and clicking on this should trigger that record to be loaded into the DetailsView for editing. The problem is that the record never gets loaded into the DetailsView. Instead, the DetailsView always and only...
0
984
by: JonBosker | last post by:
Help... I have a brand new database table and I open the page that has a DetailsView control that is bound to that table it does not show anything - not even a new button - so how can I add the first record?? The reason I ask is because I have a generic page that will display data from any table. Therefore I cannot add the row programmatically - I have tried adding blank values (by querying the SQL Server schema (SELECT COLUMN_NAME,...
1
1237
by: JonBosker | last post by:
Help... I have a brand new database table and I open the page that has a DetailsView control that is bound to that table it does not show anything - not even a new button - so how can I add the first record?? The reason I ask is because I have a generic page that will display data from any table. Therefore I cannot add the row programmatically -
2
11638
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 SelectButton), the selected record is shown in the DetailsView, which is correct - however, when I choose "Update" on the DetailsView I am presented with the EditItemTemplate which contains the first record in the DetailsDataSource. The code...
0
1016
by: Seth Williams | last post by:
I have a Master/Detail page - the DetailsView is set to ReadOnly, and AutoGenerates Delete/Edit/Insert buttons The Gridview has records - when a record is selected, the DetailsView is populated I can successfully Delete/Insert/Update - no problem However, since it's set to ReadOnly, the DetailsView is not visible when no records are in the Gridview and the corresponding table I need it to be visible, so I can choose the Insert...
0
1055
by: jemitch0 | last post by:
I have a 2 column table that contains FK to other tables in my app. The 2 columns together form the PK for the table. I want to be able to update these values using a Detailsview, but can't get the update to work, the record does not update. I tried adding additional parameters to the Update Parameters of the SqlDataSource, then setting those params programatically, but still does not work. <asp:DetailsView ID="property_detail" ...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.