473,761 Members | 5,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gridview and Detailsview "New" record

Hi,

I have a dropdown menu with categories and when a category is selected
the Gridview is binded with sub-categories. Then when a sub-category is
selected a detailsview is displayed side-by-side to the gridview and
then I can click on "new" and isert a new subcategory or edit and
update the sub-category.
My problem is that when a category doesn't have any sub-categories then
the Gridview is not displayed therefore there's no way I can see the
detailsview and the "new" button so I cannot insert any new
sub-categories.
How can I enable the insert method of the detailsview when there aren't
any records on the gridview and in which event do I do that?
An example would be very much appreciated.

Thanks a lot
Giorgio

Mar 15 '06 #1
1 3146
Hi

Modify the EmptyDataTempla te of the xxxView-kontrol by inserting a
linkbutton which change the ViewMode like
protected void addNew(object sender, EventArgs e)
{
DetailsView1.Ch angeMode(Detail sViewMode.Inser t);
}

Mar 15 '06 #2

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

Similar topics

5
1478
by: HS1 | last post by:
Hello I have Win application used to add records into a table (called Clients) in an Access database. I use a DataGrid1 to present records in this table and use some TextBox(es) to display the details of a selected record.
0
1287
by: Nick | last post by:
How do I go about setting a default value for a row when inserting a new record with the DetailsView ? Effectively I need to access the underlying data source and set a column to be a default value of my choosing. Nick
1
3446
by: 蟲蟲小姐 | last post by:
How to add a new record in DataGridView? (For Web Project) I want to know the syntax? Is anybody can help me? Thanks a lot.
1
20669
by: AA Arens | last post by:
I my form I have put record navigation buttons. When I choose just before the last record, the "Go to next record" button, access automatically start with a new record instead of a message that theere are no records after. I do have a command that automatically jumps to the last record after I open the form: Private Sub Form_Load() DoCmd.GoToRecord , , acLast
1
3699
by: JayD | last post by:
Here is the problem: Using asp.net 2.0 to create a web app with standard master table gridview and child detailsview with insert capability. SQL Server 2000 database on the backend. Using Visual Web Developer for front-end development. I want to insert new records in detailsview based on selected gridview record. All the fields in "INSERT" mode are blank, which is okay EXCEPT that I want the child ID to be that of the selected...
5
20326
by: Piedone | last post by:
Hi! I'm new to this forum, but i try not to post a stupid question the first time :-). I googled for my problem, but couldn't find any answers. When we open a select query, there is always a "new" line, where you can type in a new record. I use a "multiple items" form, where this new line shows as an empty record. Of course this is not very nice, so i would like to remove it. Anybody knows what could i do? Let me know please!
3
3629
rsmccli
by: rsmccli | last post by:
Using AC2002 Hello. I am working with an existing DB that has "Add New" command buttons on two forms. When I, an Admin, click the buttons, they work properly, and a new, blank form is created, ready for data entry. When one of my users from the "Update Data" workgroup clicks the button, they get an "Error 2105: You can't go to the specified record" error, and no new row is created. Each of these are just supposed to add a new row in...
2
2082
by: MLH | last post by:
I have an A97 form with Allow Edits, Allow Deletions and Allow Additions properties set. Scrolling through records will eventually take me to the end of the records and one more PgDn will take me to a new record. I also have a cmd button on the form to take me instantly to a new record. There are 2 controls on the form I would like disabled whenever I'm at a new record. I want them enabled at all other times. Which event property would...
7
8696
kcdoell
by: kcdoell | last post by:
Good morning everyone: I created a form and set the default view as a continuous form. Basically the form is displaying records in which the user can add or edit new ones. The record source for this form is a query that I built that is based on a table. I have been working on this for several weeks and now I have been told that many times when a user wants to create a new record, much of the information that is displayed in a...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9989
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
9925
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
9811
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
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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
5266
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
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.