Hi Gary,
As for .NET 2.0 GridView (or DataGrid) that associate with DataSource
control, it does support AD hoc data access such as query, update, delete
without writing code. Actually, it is easy to perform such a task through
a simple database table. e.g.
** drag a data source control onto the page and configure it, make sure you
choose generate update/insert/delete query together with select query
** drag a gridview on to page and bind to the datasource control added
previously
** in the Gridview action list, choose to enable "Editing", "Deleting"
then, run the page, you should be able to select, edit, delete records.
This is just for very simple AD HOC scenarios. Are you encoutering any
particular error when running the page?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "GaryDean" <gdeanblakely@newsgroup.nospam>
>Subject: Modifying Data in a GridView Web Server Control
>Date: Sun, 30 Mar 2008 17:52:31 -0700
>The title of this post is the subject of an MSDN article at:
>http://msdn2.microsoft.com/en-us/library/c4245bb4(VS.80).aspx
[quoted text clipped - 12 lines]
>Thanks,
>Gary
GaryDean - 31 Mar 2008 18:28 GMT
Steven:
Well, first the SQLDatasource doesn't have an option for automatically
generating update, insert, delete (as does the xsd generator) that I can
find. So I use the xsd generator to generate stored procedures, I put then
into the database and then drag a sqldatasource onto the page, specify the
individual stored procedures, drag a gridview, hook it up and specify
editing.
When I run it I can edit, enter a new value in a column just fine. The only
problem is that the update does not occur.
Gary
> Hi Gary,
>
[quoted text clipped - 73 lines]
>>Thanks,
>>Gary
Steven Cheng [MSFT] - 01 Apr 2008 03:01 GMT
Hi Gary,
As for generating the update/delete statementes, you can do it as below(in
SqlDataSource):
** In Design-view on page, select SQLDataSource and click "Configure
DataSource" action item in the action panel
**After choose data connection, you're brought to "configure the select
statement page"
**You can choose "specify columns from table or view"(the default setting),
then you can find a "Advanced" button on the right side of the dialog
**Click the "advanced" button, and you'll find the option to let you
generate Insert,Update,Insert statement
Please feel free to let me know if you still have difficulites got it
working. BTW, as I mentioned, this is for ad hoc scenarios, for complex
data manipulating, we generally create custom dataset/table adpater or data
access class to do the work.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "GaryDean" <gdeanblakely@newsgroup.nospam>
>References: <#Y7PBmskIHA.5160@TK2MSFTNGP05.phx.gbl>
<vhl9doukIHA.360@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Modifying Data in a GridView Web Server Control
>Date: Mon, 31 Mar 2008 10:28:55 -0700
>Steven:
>Well, first the SQLDatasource doesn't have an option for automatically
[quoted text clipped - 34 lines]
>>
>> Microsoft MSDN Online Support Lead