473,782 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Referencing Detailsview from emptydatatempla te

geo039
47 New Member
I have add functionality in my gridview footer and a detailsview in the emptydatatempla te. I need to write the same code I have for gridview_rowcom mand but i'm not sure how to reference it. Basically how do i say this for a detailsview


Expand|Select|Wrap|Line Numbers
  1. Protected Sub gridLocations_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) 
  2. If e.CommandName = "Insert" AndAlso Page.IsValid Then
  3.  
  4. ' Insert new record
  5.  
  6. Dim roomnum As String = CType(gridLocations.FooterRow.FindControl("txtAddRoom"), TextBox).Text 
  7. Dim bldgid As Integer
  8.  
  9. bldgid = gridBldgLoc.SelectedValue
  10.  
  11. AddNewRoom(roomnum, bldgid)
  12.  
  13. End If
  14.  
  15. End Sub
Aug 30 '07 #1
0 1190

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3900
by: Justin Rich | last post by:
My details view is in insert mode and my dataset is empty but the details view doesnt show.. not sure how to toss this at MS but i think they should code that if its in insert mode the empty dataset doesnt make it invisible..
12
8705
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?
1
3148
by: Giorgio | last post by:
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...
0
2102
by: j-in-uk | last post by:
Hi, I am using the gridView control at first the EmptyInsert command is executed from the EmptyDataTemplate but when a user clicks Edit after the 1st insert, for some reason it detects the rowtype as empty datarow and does not go to Edit mode but displays all the controls from EmptyDataTemplate instead. what am i missing?
0
1360
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 query string of the page. Now, I have sucessfully done this with a detailsview that is not enclosed in a datalist, using the following page load script: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
1
5030
by: needhelp1 | last post by:
I have gridview with a detailsview below. When I click on 'New' in brings up the DetailsView for inserting. When I click on 'Edit' in does not brink up the DetailsView. What am I doing wrong? I totally at a loss, please help. I don't know if I need to something to grdUserProfile_RowEditing. Thank you! This is some of my code behind: protected void grdUserProfile_RowEditing(object sender, GridViewEditEventArgs e) { } protected void...
0
859
geo039
by: geo039 | last post by:
Okay okay this is killing me. I have a gridview with a footerrow to add rooms to the selected value of bldg. When there are no rooms I dropped a detailsview in the emptydatatemplate. I wanted to use the same code I have so the user doesn't have to deal with bldgid but nothing is working. Any ideas how I can accomplish this task, maybe I need to redo everything. Footer row says this and works Protected Sub gridLocations_RowCommand(ByVal sender...
1
7289
by: Jeff | last post by:
hi asp.net 2.0 I have a GridView here with some controls in it's EmptyDataTemplate. I'm wondering how I can get access to those controls. I've tryed using FindControl, but that doesn't work because EmptyDataTemplate doesn't have that method <EmptyDataTemplate>
3
8419
by: BiffMaGriff | last post by:
Hello, I want to use the GridView footer for inserting new items into my table. However when the table is empty I'm forced to see the EmptyDataTemplate. Is there a way to disable using the EmptyDataTemplate? If not, what are some strategies for overcoming this? I'm binding to a strongly typed object data source. Thanks, -Biff
0
9639
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10311
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
10146
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
10080
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
9942
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
5378
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...
1
4043
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
2874
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.