Using a row selection in a gridview to create database rows for another gridview

Hi there,

I have 2 gridviews on a form, the first displays some template rows from a database table. 

The second displays some user specific rows (with additional data added to the template info) from the same table.

They both work fine for displaying the info. 

Now what I want to do, is allow users to 'select' a template row on the first gridview, and have that action automatically:

  • create a new user-specific row, with added fields from profile data etc.
  • insert it into the table
  • then refresh the second gridview in order to show the new added row.

Can anyone please give me advice about the best way of going about this as I'm pretty new to this development environment.

Thanks for your help, Confused Jo

0
JoH
3/26/2007 11:44:17 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

0 Replies
1072 Views

Similar Articles

[PageSpeed] 34

Reply:

Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

Selecting the multiple rows in GridView and inserting the selected rows to another Gridview & Performing some operations on it
 Dear All, I have become mad for solving this problem. Please Help me. I have a Gridview bound to a datasource. I inserted the CheckBox Control in Templet to select certain rows. Gridview1 contains some products id & name.I want to insert the selected rows in to second Gridview  and in the second Gridview I need to add two more colums AdvicedQty & AcceptedQty(TextBox Cotrol).The user will select few products in Gridview1 & clicks add which will be added another gridview then in second Gridview he enters the AdviceQty & AcceptedQty.After entering the data he cli...

Selecting a gridview row and keeping the last selected row in a gridview highlighted after mouse moves over a new row.
What is the best way to show a gridview row highlighted once selected and keep it highlighted once the mouse moves over a different row? Thanks, Steve hi,you can use <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="#FFFFFF" /> plz let me know if i misunderstood you Thanks for your help. One problem; however, is that after the row has been selected and I check the "grid.SelectedIndex" it has a value of -1 and not the index of the row that was selected on the grid. What do you recommend? Thanks, Steve hi, sorry i din...

Problem in Using DropDownList Control to select a selected row of SqlDataSource that is under GridView Control
Hi all,In my SQL Server Management Studio Express, I have a database "ChemDatabase" that has a table "LabData"  formatted in the following way: SampleID int PRIMARY KEY, SampleName nvarchar(25), ChemicalName, nvarchar(25), Concentration decimal(6.2) with 5 rows of records in this .dbo table. In my Visual Web Developer Express, I created a website "RPD-TCE" for extracting a row of record from the LabData table by using a DropDownList, a GridView and a SqlDataSource.  I want to click DropDownList to list one number of S...

populate a gridview from a selected row in another gridview
can someone give me an overview of how to grab a row from a gridview with a select button that is clicked to populate another gridview   Here is the markup for my gridview<asp:GridView ID="grdContacts" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" AutoGenerateColumns="False"> <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" /> <RowStyle BackColor="#FFF7E7" ForeCol...

new row below selected row in gridview to display child gridview
Hello,   I have a gridview that up selected..shows the nested child grivdview. The problem I currently have is that it stuffs all the data into a column whcih blows the whole tbale out of whack. What I need to do is create a new row below the sleected row to house the new child grivdview. I have seen third party controls do this such as teleriks radgrid but I wont to do this with the gridview control.  Any articles on how to do this? Does AJAX support this? Any help is greatly appreciated.    ...

returning the database row ID from a selected row from a GridView
Hi I'd like to be able to display a gridView with rows of data, and when the user selects a row, somehow return the ID value for the respective row from the database, not the row in the gridView - if that makes sense. If possible, I don't want the ID displayed in the gridView. Thanks for any helpRichard Use DataKeyNames and SelectedDataKey Property of GridViewSomnath Mali.NET Developer , Pune INDIA.Please Mark As Answer If my reply helped you. I’m not sure what it is your describing; could you elaborate? ThanksRichard 1. <asp:GridView DataKeyNames="ProductID" Al...

Gridview paging enabled. Has checkbox to select the row . If user select the checkbox on one page and move to 2nd page to select the rows there also to export the selected rows to excel. But doing so
HiI am using Gridview and that has paging enabled. Using checkbox to select the particular row of the gridview to export the selected rows to the excel . Everything is working fine except for one case.Let user selected the "check" box for, five rows which user would like to export to excel (two of rows on page 1 of results and 3 of them on page 2 of results), however it only exports the 3 row details from page 2, because it seems to de-select the 2 rows from page 1 when I move to page 2 and vice versa. The code i am using is as :protected void BtnExcel_Click(object sender, EventArg...

Data Controls insert rows into gridview then insert rows from gridview into SQL Table
Hello there, I'm still new at performing miracles with code . Currently I am having trouble with my latest coding adventure I have a web application which records jobs and labour assigned to jobs. The issue in particular I'm having is the way in which labour is to be assigned. I want to use standard controls (Textbox, Dropdownlist) to record the values into a gridview (ie,put multiple rows into the gridview using the controls). Then, when all the inserting is complete, the user clicks a submit button to insert all the rows from the gridview into a database table. The reason for...

I want to select a row and column in gridview using radiobutton in gridview
I want to select a row and column in gridview using radiobutton in gridview . if which radio button is select that row will select and i want that row column values in outside individual textboxes of next page.  but in that only single radiobutton will select and no post back="true" bcz iam not using checked change property. i inserted button below gridview. if i click the that selected row and columns values are stored into textboxes of next page im using this code .but im getting one column in that row. but i want all columns in that selected row so plz repla...

how to place a selected row from a gridview into another gridview by clicking a button
hi, In my application  i have binded the data from data base table to a grid view. my database table attributes are prodid,prodname ,price and qty. my grid view columns includes qty,prodname,price.i placed checkbox into my gridview and i placed a textboxes in the last column for placing required  qty from the available qty.after clicking on a checkbox of a perticular row  that selected row should be placed into another grid view by clicking on a submit button. the second gridview columns are serial no,prodname,qty(user required qty ), total price. in the last row of grid...

How to use GridView row's Key selected for Delete as select parameter for another datasource
I'm not sure if the subject title makes sense, but it wasn't too easy to describe what I'm trying to do in one sentence! When a user clicks on the delete link in a GridView row, I want to run a stored proc, using the Key of the selected record as the parameter for the stored proc. I then want to programatically access the result of the stored proc (it'll be an integer value) for code-behind use. I wrote out a few steps to help me figure out what I need to do: 1) Get the value of PersonnelID (the DataKey) from the selected row in the GridView2) Set that Perso...

Phantom gridview created upon selecting a row in main gridview
Hi there,I have a main gridvew and when you select a row it updates a secondary gridview below it.  The columns in this main table are autogenerated,  when I select a row from the main gridview, the secondary gridview will show the correct data but another gridview (a copy of the second) appears below. Subsequent selections alter the 2nd gridview as it should but the phantom gridview is still there. I've just pasted the code for my custom page below but i'm just not sure where to start looking for this bug because it happens in the default templates aswell. Maybe it...

pass selected gridview row to another gridview on new page
hi people.. well i am stuck with the gridview problem.. i have a gridview on a page and when the user selects a gridview row then the user is redirected to a new page. then another gridview on this new page should show the selected gridview row from previous page... is it possible... please help me with this...  There's Always Something to learn in everything. HiI have did little in the Data moving from one GridView to another.Just take a look and modified as you want. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MoveRecord.aspx.cs&...

Web resources about - Using a row selection in a gridview to create database rows for another gridview - asp.net.presentation-controls

Selection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Doc Rivers Comments on If Kobe Bryant Deserves NBA All-Star Game 2016 Selection - Bleacher Report
Kobe Bryant is getting the legend treatment for the All-Star Game in his final NBA season, and that's totally fine with Los Angeles Clippers ...

Running back LeSean McCoy the lone Pro Bowl selection for Bills
LeSean McCoy's first season with the Buffalo Bills will end with a trip to the Pro Bowl. Maybe. The running back was the lone member of the team ...

Jeff Long no longer chair of College Football Playoff Selection Committee
Arkansas athletic director Jeff Long's tenure as chairman of the College Football Playoff Selection Committee will end after two seasons.

Return of Yuvraj, Nehra: Selection gamble may just be the tonic India need
There were quite a few surprises thrown by the selectors as they announced the squads for Australia tour, with Yuvraj and Nehra's selection the ...

Jury selection set in fatal 2014 Bourbon Street gunfight - Fox News
A trial is scheduled to begin in New Orleans for the only person arrested following a 2014 gunfight on Bourbon Street that left a bystander dead ...

Jury Selection to Start in Real Estate Agent Killing Trial
Lawyer expects no trouble seating jury for man charged in Arkansas real estate agent's killing

Rashida Jones Sings & Stars In Boss Selection's 'Flip & Rewind' Music Video
... executive producer Jo Miller of Full Frontal . Rashida recently teamed up with her nephew Sunny Levine for his brand new project Boss Selection ...

Today’s selection of articles from Kotaku’s reader-run community: Smelling the Roses Without Any Nos
Today’s selection of articles from Kotaku ’s reader-run community: Smelling the Roses Without Any Noses: Final Fantasy Tactics in 2015 • The ...

2015 National Film Registry Selections
The Library of Congress named this year’s National Film Registry selections today . As usual, it combined some big-budget movies people love ...

Resources last updated: 1/16/2016 2:34:12 PM