473,378 Members | 1,391 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,378 software developers and data experts.

DGV editing on a row that is removed

116 64KB
Hi,

Could anyone let me know the etiquette/error-handling for the following situation?

I have a DGV with rows that are liable to be removed via a call to a third party data source. There is a possibility that a cell will be in the process of being edited when the row is removed. This tends to cause havoc with the EndEdit handler as it doesn't get called.

I have tried to deal with it by checking if the row about to be removed is the CurrentRow.Index and then forcing an EndEdit but this seems to cause other issues - possibly because the Index changes etc.

So - is there any proven method of safely losing a row without warning that has the cursor within it?

Thanks in advance.
Feb 20 '14 #1
2 906
Luk3r
300 256MB
I'm not exactly sure how your system is setup, but is it possible that you get a row count in your data source prior to "updating" the record? And if the row count doesn't match then just complete a DGV.Refresh() when trying to submit the change?
Feb 20 '14 #2
robertybob
116 64KB
Hi Luk3r,

Thanks for the reply. The DGV updates itself fine - there's just a possible conflict if editing starts on a cell and doesn't get finished before that row is removed. there's a procedure on EditStart and one on EditEnd but if the row disappears before the editing is complete the the EditEnd can't run.

All the best
Feb 20 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
1
by: Raterus | last post by:
Hi there, Should I be concerned with a malicious user spoofing a postback by changing the values for a control like the dropdownlist found in the rendered <option> tags. I would hope asp.net...
0
by: Jimmy Tharpe | last post by:
Hi, I am having trouble editing the code-behind files of ASP.NET applications in Visual Studio .NET. I often lose syntax highlighting, code formatting, and intelisense. Occasionally, I lose...
0
by: Sean McLeod | last post by:
Hi This MSDN article http://msdn.microsoft.com/msdnmag/issues/04/06/ASPNET20Overview/default.aspx makes mention of a DropDownListField that can be used in a GridView or DetailsView control. ...
4
by: ABC | last post by:
Web.Config Editing have no intellisense feature on VC# web site project under VS IDE 2005. How can I turn it on?
5
by: trynittee | last post by:
Hello, It's been a while since I've posted. I am an intermediate user of Access. I can read simple VB code, have done complex queries, comfortable with event procedures, designing forms and...
6
by: =?Utf-8?B?RGF2aWQ=?= | last post by:
Hello, How can I disable that message/question that appears when my program edits an Excel file? Here's the code: Excel.Application excelApp = new Excel.ApplicationClass(); Excel.Workbook...
5
by: Zytan | last post by:
I cannot stand being unable to change the code while the debugger is running. Is there a way to do this? thanks, Zytan
9
by: pvsundarram | last post by:
hey, i am trying to cancel the keydown event for certain keycodes( for eg:- enter key ).But the cancelling of this event is not happening in firefox. Is there any way to cancel the event in the...
2
by: MGM | last post by:
I have a bunch of fairly large databases, each going anywhere from 1,000 rows to 50,000 rows. These databases, however, need some editing. They have extra columns that need to be removed and...
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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.