473,406 Members | 2,220 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,406 software developers and data experts.

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

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 2836
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.Fields(m).Text=GridView1.SelectedRow. Cells.Cell(n).Text
Thanks, But is it possible to do that without having to use another event??
Mar 8 '07 #2
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_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
DetailsView1.Rows(7).Cells(1).Text = Menu1.SelectedValue.ToString
DetailsView1.Rows(1).Cells(1).Text = CStr(Session("myuwi"))
DetailsView1.Rows(2).Cells(1).Text = CStr("ACTUAL")
DetailsView1.Rows(3).Cells(1).Text = GridView1.SelectedRow.Cells.Item(5).Text
DetailsView1.Rows(5).Cells(1).Text = GridView1.SelectedRow.Cells.Item(7).Text
DetailsView1.Rows(8).Cells(1).Text = Menu1.SelectedItem.Parent.Parent.Text
TextBox1.Text = DetailsView1.Rows(7).Cells(1).Text
TextBox2.Text = DetailsView1.Rows(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
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...
3
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
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...
1
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...
2
by: rodchar | last post by:
hey all, how can i test if this template is currently active in the code-behind? thanks, rodchar
0
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...
0
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...
1
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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...
0
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...
0
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...
0
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,...
0
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...

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.