473,804 Members | 2,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filling of datafields in Details View using emptydata template or insert data templat

3 New Member
I am using a gridview and a details view with a single object data source connecting to an Oracle database. When clicking the new button I get a form with all the fields empty. How can I get some of these values filled up automatically so that a user needs to update only those fields which are likely to change or How can some of these values, which are likely to be constants for a given instance, be supplied so that a user can see these values after clicking the New button(in the details view) just as he can see on clicking the edit button in the gridView.
Mar 7 '07 #1
2 2853
kaywish
3 New Member
Hello, I managed to solve the problem by using another click event (menu in my case) when the empty details view is displayed using:
DetailsView1.Fi elds(m).Text=Gr idView1.Selecte dRow.Cells.Cell (n).Text
Thanks, But is it possible to do that without having to use another event??
Mar 8 '07 #2
kaywish
3 New Member
Hello thanks to somebody who is reading this and wants to help me. I made some errors in the previous posting and the following is the method which worked only partially:

Protected Sub Menu1_MenuItemC lick(ByVal sender As Object, ByVal e As System.Web.UI.W ebControls.Menu EventArgs) Handles Menu1.MenuItemC lick
DetailsView1.Ro ws(7).Cells(1). Text = Menu1.SelectedV alue.ToString
DetailsView1.Ro ws(1).Cells(1). Text = CStr(Session("m yuwi"))
DetailsView1.Ro ws(2).Cells(1). Text = CStr("ACTUAL")
DetailsView1.Ro ws(3).Cells(1). Text = GridView1.Selec tedRow.Cells.It em(5).Text
DetailsView1.Ro ws(5).Cells(1). Text = GridView1.Selec tedRow.Cells.It em(7).Text
DetailsView1.Ro ws(8).Cells(1). Text = Menu1.SelectedI tem.Parent.Pare nt.Text
TextBox1.Text = DetailsView1.Ro ws(7).Cells(1). Text
TextBox2.Text = DetailsView1.Ro ws(1).Cells(1). Text
End Sub
Now, while the text boxes 1 & 2 show correctly the values the insert to the database does not work. Also the appearance of the text boxes in the detailsview change. Can somebody help me? I am not a programmer.
Mar 9 '07 #3

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

Similar topics

6
2926
by: MPowell | last post by:
Lets suppose the return value on new_command is MSG2_STATUS My intent then is to memcpy the data via the call to CMDHolder and have a function that'll retrieve a copy of the 'stored' data. The latter I'm unsure how to do. Any help appreaciated. #include <iostream> #include <map>
3
1937
by: BigMan | last post by:
Here is a piece of code: #include <memory> using namespace std; template< typename SomeType > void f(auto_ptr_ref< SomeType >) { }
7
4357
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the sqldatasource of the formview. If i put this textboxes outside the table everything works well, but as soon as i put them inside the table (in order to organize the layout in the right way) they doesn't work. They works only as eval() and not bind()...
1
3336
by: rllioacvuher | last post by:
I need help with a program. I have implemented that following header file with an unordered list using one array, but i need to be able to use an ordered list and 2 arrays (one for the links and one to use as an index to the freearray cells). Here is the exact problem specifications: Create an ordered list template class named OLType to implement an ordered list with operations of insert, remove, print, empty, full, size. The storage...
2
2791
by: rodchar | last post by:
hey all, how can i test if this template is currently active in the code-behind? thanks, rodchar
0
908
by: Bishop | last post by:
ASP.NET 2.0 I have a SqlDataSource that was created for a gridveiw. I'm using the same SqlDataSource for DB inserts using a Details View. My Details View DefaultMode set to Insert because that's all I use the Details View for. Everything works fine with standard data bound fields but once I convert one of the fields to a template column the data passed to the SqlDataSource for that field is null. Any ideas of what I may be doing...
0
2404
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
1
1684
by: andy4k | last post by:
i am trying to populate a detailsview insert view date field with todays date and converted 1 to template view and herd ya can do it through data binding in the code be hind and i be damned if i can find the heading and footer ya put in the code behind for a detailsview data binder if ya double click on the details view it creates the 1 for changes but god knows how ya suppost to find the 1 for databinding if thats the 1 a need any1 know where...
2
3086
by: Toni Pohl | last post by:
Hi, some years ago I´ve implemented an classic ASP form which fills in data from a database into a PD-form. I used the free FDF Toolkit which worked very well. After submitting the PDF the asp-form reads the data of the datafields and write them into the database again. Now I want to implement an improved ASP.NET version with VB.NET and I found iText.net. - FDF seems to be completly outdated?
0
10578
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
10332
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...
0
10077
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
9152
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 project—planning, coding, testing, and deployment—without 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
7620
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
5522
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
4300
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
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
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.