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

datagridview reverts changes when using the InsertCopy-Method?

1
Upon commiting changes to a row the following method is executed:
Expand|Select|Wrap|Line Numbers
  1. ...
  2. // Commit the value to another function and read back a properly formatted string. E.g. if the value was 123 it will now be 123.00
  3. dataGridView1[e.ColumnIndex, e.RowIndex].Value = Manager.UpdateTransaction(newRow, e.ColumnIndex, dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString());
  4. ...
  5. // the value of the cell dataGridView1[3,e.RowIndex+1].Value is 123.00
  6. // delta is negative in the next command
  7. dataGridView1.Rows.InsertCopy(e.RowIndex, e.RowIndex + delta);
  8. // the previous row is now located 1 row further dataGridView1[3,e.RowIndex+1].Value 
however is now 123 instead of 123.00

Why is the string value being reset from 123.00 to 123? It doesn't make any sense to me...
Sep 13 '15 #1
0 1454

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

Similar topics

16
by: Dave Smithz | last post by:
Hi, In summary: I want to a form to submit information via a HTTP POST, however, when using Internet Explorer I want to be able to use the back button and all the information retained....
4
by: CroDude | last post by:
I've made a custom groupbox control. Inside, as one of it's members is CSimpleGradient object. CSimpleGradient is a wrapper class for gradient usage. Basically it looks like that: public class...
13
by: Bev in TX | last post by:
We are using Visual Studio .NET 2003. When using that compiler, the following example code goes into an endless loop in the "while" loop when the /Og optimization option is used: #include...
1
by: mike | last post by:
Hi, I'd like advice from a .NETer. I have a loadcombo routine which sets the selectedindex to -1 if it's an "add record", but then it goes to a security routine which, based on permissions...
0
by: Benny | last post by:
I'm testing to see whether msbuild can replace nmake. project file <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="test"> <Exec Command="test.exe"/>...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
4
by: sebastian.dau | last post by:
Hello Newsgroup, I have a link error that I did not manage to fix. I basically consume a VC 8.0 C++ dll that exports a class with a method containing CString declaration as follows: class...
7
by: cyberlei | last post by:
Hello Guys, Just wondering how I can make the substr value changes when submit into mysql. something like: someone typed A123456 on a blank field and submit into mysql. the Value will only...
0
by: aravinda | last post by:
Why Group Box Border Color Changes when upgrading from VB6 to VB.net Answer : When upgrading to VB.net upgraded projects takes the Enable Application as Disable, So manually we make it as...
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:
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...
0
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,...
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
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,...

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.