473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid - After delete row and upate got unknow error

I an addnew and modify all the rows in my Datagrid .
However , If i highlight the whole rows , press 'delete' and the process
daInv.update(ds Inv,"mytable)
I got the following error
"This row has been removed from a table and does not have any
data.BeginEdit( ) will allow creation of new data in this row.

Please help !!
--
..
Nov 21 '05 #1
5 5618
Agnes,

What is "delete" in your text ?

Cor

"Agnes"
I an addnew and modify all the rows in my Datagrid .
However , If i highlight the whole rows , press 'delete' and the process
daInv.update(ds Inv,"mytable)
I got the following error
"This row has been removed from a table and does not have any
data.BeginEdit( ) will allow creation of new data in this row.

Please help !!
--
.

Nov 21 '05 #2
Agnes,

What is "delete" in your text ?

Cor

"Agnes"
I an addnew and modify all the rows in my Datagrid .
However , If i highlight the whole rows , press 'delete' and the process
daInv.update(ds Inv,"mytable)
I got the following error
"This row has been removed from a table and does not have any
data.BeginEdit( ) will allow creation of new data in this row.

Please help !!
--
.

Nov 21 '05 #3
User can use mouse and highlight the whole row in datagrid, 'press' Delete
button (the delete button in keyboard),
And User need to press 'Save & Exit' button, <-- in that button, I will run
daInv.update(ds Inv,"mytable)

Finally, got such error.
--
..
"Cor Ligthert" <no************ @planet.nl> ¦b¶l¥ó
news:uC******** ******@TK2MSFTN GP11.phx.gbl ¤¤¼¶¼g...
Agnes,

What is "delete" in your text ?

Cor

"Agnes"
I an addnew and modify all the rows in my Datagrid .
However , If i highlight the whole rows , press 'delete' and the process
daInv.update(ds Inv,"mytable)
I got the following error
"This row has been removed from a table and does not have any
data.BeginEdit( ) will allow creation of new data in this row.

Please help !!
--
.


Nov 21 '05 #4
Agnes,

As far as I know is this not a delete, however a remove. Therefore the row
is removed from the datatable, while a delete just set the rowstate to
delete and removes that with the acceptchanges done in the dataadapter.

In my opinion is the best thing you can do is to disable that behaviour of
that deletekey .

http://64.78.52.104/FAQ/WinForms/search/889.asp

I hope this helps,

Cor
"Agnes" <ag***@dynamict ech.com.hk>
....
User can use mouse and highlight the whole row in datagrid, 'press' Delete
button (the delete button in keyboard),
And User need to press 'Save & Exit' button, <-- in that button, I will
run
daInv.update(ds Inv,"mytable)

Finally, got such error.
--
.
"Cor Ligthert" <no************ @planet.nl> ¦b¶l¥ó
news:uC******** ******@TK2MSFTN GP11.phx.gbl ¤¤¼¶¼g...
Agnes,

What is "delete" in your text ?

Cor

"Agnes"
>I an addnew and modify all the rows in my Datagrid .
> However , If i highlight the whole rows , press 'delete' and the
> process
> daInv.update(ds Inv,"mytable)
> I got the following error
> "This row has been removed from a table and does not have any
> data.BeginEdit( ) will allow creation of new data in this row.
>
> Please help !!
>
>
> --
> .
>
>



Nov 21 '05 #5
I will Try that Confirmatoin with "Delete Key " . Thanks a lot

--
..
"Cor Ligthert" <no************ @planet.nl> ¦b¶l¥ó
news:%2******** ********@TK2MSF TNGP14.phx.gbl ¤¤¼¶¼g...
Agnes,

As far as I know is this not a delete, however a remove. Therefore the row
is removed from the datatable, while a delete just set the rowstate to
delete and removes that with the acceptchanges done in the dataadapter.

In my opinion is the best thing you can do is to disable that behaviour of
that deletekey .

http://64.78.52.104/FAQ/WinForms/search/889.asp

I hope this helps,

Cor
"Agnes" <ag***@dynamict ech.com.hk>
...
User can use mouse and highlight the whole row in datagrid, 'press' Delete button (the delete button in keyboard),
And User need to press 'Save & Exit' button, <-- in that button, I will
run
daInv.update(ds Inv,"mytable)

Finally, got such error.
--
.
"Cor Ligthert" <no************ @planet.nl> ¦b¶l¥ó
news:uC******** ******@TK2MSFTN GP11.phx.gbl ¤¤¼¶¼g...
Agnes,

What is "delete" in your text ?

Cor

"Agnes"

>I an addnew and modify all the rows in my Datagrid .
> However , If i highlight the whole rows , press 'delete' and the
> process
> daInv.update(ds Inv,"mytable)
> I got the following error
> "This row has been removed from a table and does not have any
> data.BeginEdit( ) will allow creation of new data in this row.
>
> Please help !!
>
>
> --
> .
>
>



Nov 21 '05 #6

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

Similar topics

3
5028
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control, then put this control on a form. I use DataAdaptor to fill the data table and update database.
2
300
by: Mike P | last post by:
I have a datagrid with a 'Delete' column that the user can click on to delete a row in the datagrid. I thought that I would need to have some kind of error handling in case somebody goes into the database table that the datagrid uses and deletes a record while the user is still viewing the record in their datagrid, since if they then press...
1
1587
by: Karine Proot | last post by:
Hello Today I had to build a DataGrid very dynamically <asp:datagrid id="dgTAB" Runat="server" AutoGenerateColumns="False" OnEditCommand="TAB_Edit" OnCancelCommand="TAB_Cancel" OnUpdateCommand="TAB_Update" OnDeleteCommand="TAB_Delete"><Columns><asp:ButtonColumn HeaderText="Delete" Text="Delete" CommandName="Delete" /><asp:EditCommandColumn...
1
4295
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch the layout, some have child controls):
1
1302
by: Daniel | last post by:
Hi all, I have problem in auto scroll to previous page when i try to delete the last row of the datagrid. The problem scenario is: 1.I click on next page of the datagrid. 2.I delete all the data in the page. 3.When i try to delete the last row, the error happen. The error message:
0
371
by: Agnes | last post by:
I an addnew and modify all the rows in my Datagrid . However , If i highlight the whole rows , press 'delete' and the process daInv.update(dsInv,"mytable) I got the following error "This row has been removed from a table and does not have any data.BeginEdit() will allow creation of new data in this row. Please help !!
4
9686
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID which I'm editing. SELECT: SelectCommand="SELECT ProviderID, AddressID, Address, Address2, City, State, County, Zip FROM ProviderAddress WHERE...
7
3201
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the column need to be a date picker field. I know things will be easier with ASPX datagrid.
10
2945
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C 22222 D E F 33333 G H I 44444 J K L
0
7695
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...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
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...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5218
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...
0
3653
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...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
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...

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.