4 Replies - 878 Views - Last Post: 10 May 2013 - 02:20 AM Rate Topic: -----

#1 Dko   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 29-April 11

Tabbing on a new Row in a Datagrid, causes overwriting of data

Posted 08 May 2013 - 12:56 AM

Currently having a very strange run time error that I could use a little information on.

See I have a DataGridView, which I have bounded some data to. Everything works great... until I move to create a new row and tab out of the first cell in the new row. When I do this, any previous row's data get's over written with what I have set as my default data.

If I just click onto another cell or other method I don't suffer this problem and everything works fine.

A few pictures to illustrate before and after.
Before
Posted Image
After
Posted Image

I am hoping to figure this out. But I need more information, as of right now I'm clueless as to what's causing it. So could someone detail to me what happens when you hit tab on a DataGridView cell? Ill post code if requested.

Is This A Good Question/Topic? 0
  • +

Replies To: Tabbing on a new Row in a Datagrid, causes overwriting of data

#2 Dko   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 29-April 11

Re: Tabbing on a new Row in a Datagrid, causes overwriting of data

Posted 08 May 2013 - 01:53 AM

I just realized pressing any key (that causes you to finish editing the cell) causes the issue. Not just Tab.
Was This Post Helpful? 0
  • +
  • -

#3 Dko   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 29-April 11

Re: Tabbing on a new Row in a Datagrid, causes overwriting of data

Posted 09 May 2013 - 09:10 AM

I would still appreciate any information as to what happens differently, when you click out of a cell as opposed to pressing Enter,Tab or other key.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6166
  • View blog
  • Posts: 21,268
  • Joined: 05-May 12

Re: Tabbing on a new Row in a Datagrid, causes overwriting of data

Posted 09 May 2013 - 08:46 PM

I don't have time to do the search for you right now, but I recall one of the Microsoft Program Managers (last name was Bird I think), posted a blog about the entire life cycle and sequence of events when a cell is entered via the mouse or keyboard. As I recall, the DataGridView documentation for each of the events gave glimpses of the sequence, but the blog post actually put everything together into a cohesive picture.
Was This Post Helpful? 0
  • +
  • -

#5 Dko   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 29-April 11

Re: Tabbing on a new Row in a Datagrid, causes overwriting of data

Posted 10 May 2013 - 02:20 AM

Well ill see what I can do to find it when I have a chance. Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1