472,354 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 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 2795
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 Ive 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: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

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.