473,804 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question/bugs about ASp.NET2.0 SqlDataSource and GridView

ken
Hi All,

I try to using the dotnet control instead of code behind to create a quick
solution
(ASP.NET with VB.NET) by using the SqlDataSource and GridView control
(with
SelectCommand, DeleteCommand, UpdateCommand, InsertCommand)
It works fine when drag and drop in the first time. but after I have modify
something
(said, add parmeters for searching...etc ), the UpdateCommand and
DeleteCommand
failed! (that means can not update feilds or delete records. the dataset is
simple one
table with primary key), only the InsertCommand works!

I need to clear both SqlDataSource and GridView, redo again to solve it!
whats the problem, is there bugs in DotNet Control ??

thx all

Jun 27 '08 #1
1 1401
Hi Ken,

I do not see any issues with the SQLDatasource, I would recommend you to
reconfigure your SQLDatasource. When you select the fields from the table
then you select the option advanced and then check both the options for
creating the insert, update and delete statements and then check for use the
Optimistic concurrency. Rebind the Grid control with the SQLDatasource.

Please let me know your observation.

Regards,
Manish
www.ComponentOne.com
"ken" wrote:
Hi All,

I try to using the dotnet control instead of code behind to create a quick
solution
(ASP.NET with VB.NET) by using the SqlDataSource and GridView control
(with
SelectCommand, DeleteCommand, UpdateCommand, InsertCommand)
It works fine when drag and drop in the first time. but after I have modify
something
(said, add parmeters for searching...etc ), the UpdateCommand and
DeleteCommand
failed! (that means can not update feilds or delete records. the dataset is
simple one
table with primary key), only the InsertCommand works!

I need to clear both SqlDataSource and GridView, redo again to solve it!
whats the problem, is there bugs in DotNet Control ??

thx all

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5044
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my select, remember it, and then use it in the update. It works just fine when I have full control of the whole process. I want to do the same for my GridView/SqlDataSource combinations. I typically select from a view and update the corresponding...
3
2236
by: adam222 | last post by:
hello, i have a web-form with a GridView control, i wanted to update & delete, using the AutoGenerateEditButton. when i used it with sqlDataSource (executing SP in the DB) it works like a charm, but when i want to pass the data through the application's layers (BL etc.), it did not work. it seems that the 'AutoGenerateEditButton' is capable only with sqlDataSource...
4
7347
by: Bishop | last post by:
I have a number of simple select queries that a user needs to be able to execute and display the data on the screen in a gridview. My thought was that I could use a Gridview set to dymanically generate columns and bound to a SQLDataSource. Then the user can click buttons (or whatever) and it changes the SelectCommand property of the SQLDataSource and re-binds the GridView. That worked great until I enabled paging. When paging is...
3
4535
by: simonZ | last post by:
In gridView I have dropdown list : <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="ProductID" HeaderText="ProductID" InsertVisible="False"ReadOnly="True" SortExpression="ProductID" /> <asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
2
4384
by: Bob | last post by:
Hi All: I have a GridView with several pages and a FormView linked via a ControlParameter. The FormView populates correctly when the user makes a selection from the first page of the grid. However, when the user goes to the next page of the grid, the ControlParameter is passing in a null (or the default value) to the FormView. I want to populate the formview with the data from the first item of the grid. I've set...
0
1207
by: Nick | last post by:
i am a new to asp.net and what i am trying to do is simple have a grid view, which just load a contact name , there is three fields in this table, contactid, contactname and contact phone. I have sucessfully load all the data into gridview at moment. Now i am trying to do edit function. The issue i got is when i set the contactid visible property to false in grid view column collection propety, then the edition function doesn't work and...
3
1475
by: Jason Wilson | last post by:
OK I'm obviously fairly new to ASP.NET 2.0. I've used gridviews in the past but only for pages with static queries that happen onload. Now I have pretty simple scenario and I think I've followed all the examples I've been able to find, but I still don't get the gridview to render: * I have a form with some textboxes and dropdownlist and a submit button * I have sqldatasource that uses form parameters to call a stored
0
2140
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i have a gridview which displays the results of the search. if no search is entered, then the gridview shows all records. Below the gridview i have a formview for inserting and editing the records. when a user clicks on one of the records in the...
4
9792
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This sounds easy but the next requirement is that the GridView is editable. So I have included the SelectCommand and the UpdateCommand on the SqlDataSource to allow the GridView to be editable. I have now been able to get the GridView to display data...
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.