473,387 Members | 3,810 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,387 software developers and data experts.

Referencing Detailsview from emptydatatemplate

geo039
47
I have add functionality in my gridview footer and a detailsview in the emptydatatemplate. I need to write the same code I have for gridview_rowcommand 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 1175

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

Similar topics

2
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...
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...
1
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...
0
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...
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...
1
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...
0
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...
1
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.