Why can't I Enable Editing on a Gridview that gets it's data from a View through an SqlDataSource?

Hi,

I think the title explains it all really. I cannot configure the SqlDataSource to add Insert, Update and Delete statements - not through the wizard anyway.

The view combines two tables, each containing 3 columns. I have tried using different combinations of columns, and ended up selecting all of them (making sure the foreign key column of the first table was given a different alias to the primary key column of the second table) but I still cannot enable editing.

Cheers,

Patrick


Disco Patrick writes web applications using:

Visual Studio 2008
ASP.NET 3.5
C#
SQL Server 2008
0
Disco
11/22/2007 10:24:51 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

3 Replies
841 Views

Similar Articles

[PageSpeed] 29

Use stored procedures, or business component to process the operations. In case of business component, you must to use a ObjectDataSource instead of SqlDataSource.

0
mgodoy_desenv
11/22/2007 11:00:51 AM

Thanks mgodoy. Is there an explanation for why I can't use my method?


Disco Patrick writes web applications using:

Visual Studio 2008
ASP.NET 3.5
C#
SQL Server 2008
0
Disco
11/22/2007 11:24:20 AM

Cause you have more than one table to work. These controls - ObjectDataSource and SqlDataSource - normally are used to simple operations.

0
mgodoy_desenv
11/22/2007 3:52:44 PM
Reply:

Similar Artilces:

I can't get no cache, I can't get no cache. 'Cause I try and I try and I try and, I can't get no, I can't get no cache.
I have fiddled out for days tinkering with the setting in about:config trying to get FireFox 12 to use the disk cache. I have NOT found the trick. This One Trick Pony ain't doing it like it used to up until recently. Pray tell anyone, What information can I share that will point a knowledgeable person to aid me in getting FF to disk.cache? I have also tried restarting FF with add-ons disabled, (There were NOT too many to do this to, so it was quick and easy) Here is my stab at trying to convey the information that MIGHT govern matters Using about:cache Informatio...

Re: I can't get no cache, I can't get no cache. ' Cause I try and I try and I try and, I can't get no, I can't get no cache.
<div>please com e see me about htis<br /> <br /> ------- Original Message f= rom the Global Relay Archive -------<br /> From: Hp &lt;ferd@farkel.net&gt;= <br /> To: "support-firefox@lists.mozilla.org" &lt;support-firefox@lists.mo= zilla.org&gt;<br /> Sent: Sun, 27 May 2012 18:30:18 -0700<br /> Subject: I = can't get no cache, I can't get no cache. 'Cause I try and I try and I try = and, I can't get no, I can't get no cache.<br /> <br /></div> <pre class=3D"gr-maex-body-pre&qu...

What's wrong with DataBind() in GridView control? The data in GridView can't be updated when the datasource have changed!
What's wrong with DataBind() in GridView control? The data in GridView can't be updated when the datasource have changed! I bind the different datasource to the Gridview when I change the node of TreeView, the GridView control always display the same data when I click different the node of TreeView control,why?but I can get the different data in GridView when I click the Button1 or Button2. //-------------------Program Code (You may save it as a ASPX file and run it)--------------------------------<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http:/...

Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I?
Name: Ed Leech Email: ELCraftatzoominternetdotnet Product: Thunderbird Summary: Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I? Comments: I am getting frusted with all the emails coming in that I do not want, I am using the tools to get thme out but they keep coming. They just use different names or whatever. I have been thinking of just switching to something else but my business intrusts know this email and it is tooo confusing to change. Every time I go out of town on bu...

2010: Can't register - can't download the software - can't register until I have the software
I have active maintenance on Rad Studio: From: Vicky Rassmisaengthong [mailto:Vicky.Rassmisaengthong@EMBARCADERO.COM] Sent: Wednesday, February 25, 2009 1:58 PM To: rgrossman Cc: amer.supportadmin@codegear.com; Ashley Cosentino Subject: Software Assurance Support for Tech III Inc PO# Credit Card Dear Embarcadero Technologies Support Customer, Welcome! You have been registered as the primary contact on support account number AM####### Herewith we confirm your Embarcadero Technologies support agreement covering: Qty 1 RAD Studio Enterprise Named User licens...

can't get reports 'Old Chart's and 'New Charts' to work properly
1. If I try and draw a chart it doesn't go beyond June of this year so I'm missing a lot of data in the output. 2. Is there a reason for this - I have been modding bugzilla so that it has an extra status field from earlier this year - would that have had an impact ? 3. Also when I try and do a Old Chart or NewChart I can't see my new 'Status' field to select - this is ok if I do a bar chart though. cheers On Mon, 2011-12-05 at 03:25 -0800, nothtb@ukonline.co.uk wrote: > 1. If I try and draw a chart it doesn't go beyond June of this year so &g...

Gridview without 'Enable Delete' and 'Enable Edit'
What would cause my Gridview control to not have 'Enable Delete' and 'Enable Edit' listed and available to check? I am using an ObjectDataSource1 as the Gridview Datasource.   Do you have Update Parameters on your SQLDataSource and DeleteParam?If this post helped you, Mark As Answer. dlcacuff:What would cause my Gridview control to not have 'Enable Delete' and 'Enable Edit' listed and available to check? because you didnt specify Update and delete and insert functions for the Datasource  in the wizard . http://msdn2.microsoft...

Here's my perl -V; Current problem = getting msg 'can't locate ob ject method data via package CPAN::Modulelist
1. When doing perl -MCPAN -e "install 'DBI'" -- I'm getting msg 'can't locate object method data via package CPAN::Modulelist What can I do to solve this mystery? Am I suppose to first download my modules into some directory and then things will work?? 2. Here is my environment: Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=aix, osvers=4.3.3.0, archname=aix uname='aix funny 3 4 000001716600 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=unde...

Can't remove a row in dataset that is Gridview's datasource
I have the gridview display records and I add a check box in gridview, then I let user choose the row that they want to remove when they hit Remove button. The code when in VB NET form worked but I transfer it into C# and it does not work no more. Please advise. Following is the code. Prolem is at the btnDelete_Click event line 78: 78 myDS.Tables("Catalog").Rows(row.RowIndex).Delete(); It says "Error 1 Non-invocable member 'System.Data.DataSet.Tables' cannot be used like a method."  1 using System; 2 using System.Collec...

Can't get it to work. Can't get help.
Name: Tony Clarke Email: minionataondotat Product: Thunderbird Summary: Can't get it to work. Can't get help. Comments: Installed T'bird. Had to change defunct server that T'bird selected by default. Kept asking for passwords associated with previous email (Outlook Express ), when passwords entered then got error messages saying aon responded with 're-authentification failure'. Searched your knowledge base & help forums to no avail. Found them very user-unfriendly & ended up more confused than before. Would like to try T'bird, but I think ...

Can't find EDM wizard (can't add ADO.NET Entity Data Model)
I'm having trouble getting started with EDM.  I'm ultimately trying to experiment with ASP.NET Data Services.  I have never installed any ASP.NET 3.5 Extensions CTPs.  However, I have installed VS2008 SP1 Beta1 and .NET 3.5 SP1 Beta 1.  Based on the list of features in SP1 Beta 1 (http://www.microsoft.com/downloads/details.aspx?familyid=8C36ACA4-E947-4760-9B05-93CAC04C6F87&displaylang=en ) I believe I should have both EDM support and Data Services support. When I try to add a new item to my VS2008 project, ADO.NET Entity Data Model is not in the list.&nb...

GridView doesn't refresh it's schema after the object data source's GetData() method returns additional fields .
Hi . I am creating an ASP.NET web site and have the following problem :  I have a GridView which bound to the object data source. This object data source is SQL Table adapter that I added to the data set via IDE . The method GetData of this table adapter uses existing stored procedure on my SQL 2005 server. Everything worked fine , until I made a changes to the stored procedure ( the new result records have additional fields )  .  The problem is :   The new fields don’t appear in the grid . Note : When I right click to the GetData method inside the tabl...

How can I get out of my Mozilla's browser the Winamp browser and get back the Google's or Mozilla's browser.
Please I have got to my browser ( I don't know how.) the Winamp browser he behave like virus stick in.But he doesn't has uninstalation section so I can't do anything to get him away from Mozilla's file. I'm not happy of Winamp's behave its like advertisement against a customer's will. Please is there any way to get him away from Mozilla?Please send me exact direction I have tried many ways but he is deeply inside the systeme so when I install new Mozilla he is always here ready to pester me. Thank you for an answer. Richard ...

Security startup's creed: you can't hack what you can't see
Security software startup Trusted Network Technologies Inc. is expected to come out of hiding this week. But it hopes its customers will appreciate the ability to make their networks and critical information systems more clandestine. The company is expected to disclose today that it has received $6 million in first-round funding from Charles River Ventures and Flagship Ventures, and it will unveil its access-management app, Identity, which sports a sneaky twist. According to company founder and CEO Stephen Gant, the app provides user access control by embedding a two-factor identity--o...

Web resources about - Why can't I Enable Editing on a Gridview that gets it's data from a View through an SqlDataSource? - asp.net.sql-datasource

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

Gabriel Mongeon
Archive - Gabriel Mongeon

moredotnet
M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out http://www.dotnetUncle.com √ .NET NOTES OOPS in .NET .NET ...

Architectural Overview of the Windows Presentation Foundation Beta 1 Release
Introduction Windows Presentation Foundation Beta 1 Windows Integration New Features WinFX SDK Exploring the New Features Introducing "Express" ...

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at www.asp.net . Rather than type ...

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control
public class ProfiledSqlDataSource : SqlDataSource{ protected override DbProviderFactory GetDbProviderFactory() { // get the "base" DbProviderFactory ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... reports. RadPivotGrid allows easy customization of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, ...

Sign on
Sign On • Join • Forums Home User Name * Password * Remember me next time ( I forgot my password ) SUBMIT YOUR WTF Content Random Article All ...

ComboBox Sample
ComboBox is an ASP.NET AJAX control that, like the AutoCompleteExtender , combines the flexibility of a TextBox with a list of options that users ...

Resources last updated: 1/23/2016 7:00:21 AM