473,382 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Deleting last row in datagrid

Hello,

I have a datagrid bound to a datatable which has an
Identity column. I load the table from data in a
spreadsheet and manually assign seq. values to the
identity column. Once that is done, I set the
AutoIncrement property to true and the AutoIncrementStep
property to 1. When I try to delete the last row in the
displayed grid, I get the follwoing message: "This row has
been removed from a table and does not have any data.
BeginEdit() will allow creation of new data in the row."
This appears to be an informational messages that I would
like to suppress. How can where can I trap it? (BYW the
last record is deleted.)

Suresh
Nov 20 '05 #1
1 3058
Cor
Hi,

I do not know if others understand this (what you are doing) but I do not.
I load the table from data in a
spreadsheet and manually assign seq. values to the
identity column. Once that is done, I set the
AutoIncrement property to true and the AutoIncrementStep
property to 1. When I try to delete the last row in the
displayed grid,


The dataset table is a disconnected part in your program, how can you
manually assign values to the column using a spreadsheed.

There is something I can guess you did, but tell us please, before we are
only guessing?

Cor
Nov 20 '05 #2

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

Similar topics

1
by: Junkguy | last post by:
I'm having difficulty deleting rows from a datagrid. I want to put a "delete" button on a form and achieve the same functionality as hitting the "delete" key on the keyboard for the selected row of...
5
by: Mojtaba Faridzad | last post by:
Hi, with SetDataBinding( ) a DataGrid shows a DataView. user can select some rows in the grid by holding cotrol key. when user clicks on Delete button, I should delete all selected rows. I am...
2
by: Alex K. | last post by:
I am using datagrid bound to a datatable: DataTable dt = ...; MyGrid.DataSource = new DataView(dt); Now I am trying to intercept delete operation, when user highlights a row and presses...
0
by: Hrvoje Vrbanc | last post by:
Hello, this is a problem I came upon while building a site based on MCMS 2002 but it's not strictly MCMS-oriented: I have a page that displays a certain content in presentation mode but when an...
1
by: J. A. Zanetti | last post by:
Hello NG, i have this problem: in my application, i have a master- detail form displaying two DataGrids binded to DataViews. While the bindings work fine when moving through the grids' rows or...
2
by: rodchar | last post by:
hey all, i've got an asp.net page with a datagrid on it. when i delete all the rows in the datagrid it just shows the column headers. how are some ways i can clean that up? thanks, rodchar
10
by: Nick | last post by:
Hello, Please pardon my ignorance as I'm sure this is easy to do. I have a datagrid where I want to let the user delete columns. I added a context menu to the datagrid that has a delete option....
2
by: Ryan Liu | last post by:
private void dt_RowDeleted(object sender, DataRowChangeEventArgs e) { int id= (int)e.Row; if(id >5) { e.Row.RejectChanges(); MessageBox.Show(this, "Can not delete!" + id); }
9
by: Hamed | last post by:
Hello I have a DataGrid that a is bound to a DataTable. Some of the rows in the DataTable should not be deleted. How can I prohibit deleting of some identified rows? The problem could be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.