Showing table columns from multiple tables in Formview, but insert/update/delete rows of Master table

I have a page on which I have GridView and FomView control. On selection of a row in GridView the row gets displayed in the Item template of the FormVIew. The values are the result of inner join from multiple tables

i.e. table Stock,Product and Workshop. 

Please let me know how I could insert/update/delete data for the base table i.e. Stock table, but be able to see the column values from the associated tables on the Itemtemplate,Edittemplate and Inserttemplate of the FormView.

Thanks,
Anita

0
amallick
9/24/2007 10:45:17 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies
1996 Views

Similar Articles

[PageSpeed] 5
Get it on Google Play
Get it on Apple App Store

Hi:

  Take a look at this tutorial. It's for DetailsView and same table but the idea is same. You just have to change the command of SqlDataSource3.

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/detailsview.aspx

VB Master-Details w/ GridView and DetailsView
Run Sample View Source
  If it's not what you need, please inform us.
 
Regards

 

 


Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Allen
9/26/2007 1:28:48 AM

Hi Allan,

Thanks for your reply. The tutorial answers my issue.

I have created a page with Gridview and Formview having SqlDatasource with data as a result of table join, but I am having difficulty updating and deleting data in the FormView, The Insert feature works fine.

How can I enable optimistic concurrency if I don't create Sqldatasource using wizard.

Thanks,
Anita 

 

 

0
amallick
9/26/2007 3:33:34 PM

Hi:

 

amallick:
but I am having difficulty updating and deleting data in the FormView,

 

  I would use Stored Procedure. Have you tried that?

<asp:SqlDataSource UpdateCommandType="StoredProcedure" ..

VB GridView-SqlDataSource (Stored Procedure)
Run Sample View Source

amallick:
How can I enable optimistic concurrency if I don't create Sqldatasource using wizard.

  I'm not sure what do you mean by this. Do you mean you don't want to use SqlDataSource?

  Regards


Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Allen
9/27/2007 1:24:25 AM

Hi Allen,

[ I would use Stored Procedure. Have you tried that?]

I will try using Stored Procedures.

[I'm not sure what do you mean by this. Do you mean you don't want to use SqlDataSource?]

I wrote the select statement in the code itself using tag  <asp:SqlDataSource> without pulling in the SqlDataSource control onto the form and configuring it.

Thanks.
Anita

 

 

 

0
amallick
9/27/2007 10:20:48 PM
Reply:

Web resources about - Showing table columns from multiple tables in Formview, but insert/update/delete rows of Master table - asp.net.presentation-controls

Code division multiple access - Wikipedia, the free encyclopedia
Code division multiple access ( CDMA ) is a channel access method used by various radio communication technologies. It should not be confused ...

Women Share How They Reach Multiple Orgasms In New Study 5
... triple) the pleasure. For some, it's just a notion and for others it's part of their sex lives, but research suggests anyone can achieve multiple ...

Instagram Officially Adds Support for Multiple Accounts
Instagram officially announced the ability for users to switch between multiple accounts. The feature had been spotted in testing for Android ...

How to add multiple Instagram accounts on your iPhone
Multiple accounts are available now in Instagram , at long last ( and officially , too). But the process of configuring more than one account ...

Ole Miss Football Reportedly Cited for Multiple Violations by NCAA
Bleacher Report Ole Miss Football Reportedly Cited for Multiple Violations by NCAA Bleacher Report The NCAA charged Ole Miss with a slew of ...

Exit polls: Donald Trump wins with multiple groups of voters - CNNPolitics.com
... with the Republican Party and the federal government, and the candidate who railed hardest on those topics, Donald Trump, won with multiple ...

Managing multiple Instagram accounts is finally a lot easier
Switching between multiple Instagram accounts is finally going to get a whole lot easier this week. Instagram has been testing a new feature ...

Facebook is testing SMS, multiple accounts in Messenger
Facebook has slowly beefed up its Messenger offering over the past year, with not only the ability to send payments and hail an Uber ride, but ...

Instagram App Now Allows Multiple Accounts. Here's How To Do It
... its most eagerly anticipated features. Much to the delight of bloggers and business users everywhere, it’s now possible to switch between multiple ...

Scientists attack Zika virus from multiple angles
Scientists attack Zika virus from multiple angles

Resources last updated: 2/14/2016 3:20:42 AM