473,398 Members | 2,389 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,398 software developers and data experts.

Handling the RowDeleted event of a datatable

Hi All.

I'm printing the contents of a datatable in my control, and actually it is
working well. My problem is when a row is deleted from the datatable, which
fires the RowDeleted event and, inside this event, I try automatically
redraw my control.

What I have noticed is, after RowDeleted event is fired, the row is not
deleted, just the RowState is changed to deleted. And, looking for tasks in
my code, I really need that row be completely removed from the datatable
before I can redraw my control.

Is possible I change the default behaviour, to truly remove the row when
firing RowDeleted event?

Cesar
Nov 21 '05 #1
2 1685
Apparently, now is resolved..

I noticed the following:

1. datatables filled via code was already working in the right way.
2. datatables filled via DataAdapter was doing that problem (doesn't
decrement the Rowcount).

Anyways, I called Datatable.AcceptChanges( ) and the row is finally
decremented for that second case, although I lost my cache for an eventual
RejectChanges( ).

[]s
Cesar


"Cesar Ronchese" <ronchese*smlinfo.com.br> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Hi All.

I'm printing the contents of a datatable in my control, and actually it is
working well. My problem is when a row is deleted from the datatable, which
fires the RowDeleted event and, inside this event, I try automatically
redraw my control.

What I have noticed is, after RowDeleted event is fired, the row is not
deleted, just the RowState is changed to deleted. And, looking for tasks in
my code, I really need that row be completely removed from the datatable
before I can redraw my control.

Is possible I change the default behaviour, to truly remove the row when
firing RowDeleted event?

Cesar

Nov 21 '05 #2
Cesar,

You can have a look at my explanation of this behaviour at Zorpiedoman which
I have sent and which is about 9 hours later (up) in this newsgroup.

Cor
Nov 21 '05 #3

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

Similar topics

5
by: Reader | last post by:
Hello, I have a typed dataset and I have the following loop. foreach (DataTable myTable in DataStore.Tables) { myTable.RowChanged += new DataRowChangeEventHandler( Row_Changed ); ...
0
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some...
4
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
1
by: Paul Johnson | last post by:
I have problems with eventhandlers when dynamically moving controls in ASP.NET. The controls are loaded into a placeholder on postback so that the eventhadlers can fire. If a move evet or...
4
by: EvelynAnd Ethan | last post by:
Hi, ItemCommand event not firing from a dynamic user control ,WHERE A DATAGRID HAS BUTTON,when i click on the linkbutton first time the itemcommand event doesnt fire,second time event fires up ...
7
by: Raymond Lewallen | last post by:
Which would be the proper way or the reason for using any of the following or combinations of the following? These are the 3 ways I've figured I can do what I want to do, I just don't know which...
8
by: Aaron Smith | last post by:
If I add a handler to the row changed event of a datatable, it fires when a row has been added, but when in the event, it hasn't actually added the row yet... Is there a way around this? How can I...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
6
by: Class | last post by:
Hi all, I create a gridview dynamicly because I don't know the columns in advance. I use the Templatefield to create a linkbutton. Everything fine..I have the postbackurl and it works. But now...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.