DevExpress grid, new row, misses first letter on edit


Author
Message
George Nentidis
George Nentidis
StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)
Group: Forum Members
Posts: 72, Visits: 251
Hi

This is another thing I came on today.

I use DevExpres grid and BusinessBindingSource to edit a BO. DevExpress grid has an empty row, that is used for inserting new rows in the grid. When trying to insert a new row, I click on the grid's empty row and type something in. The first character I type is always lost. Then the cell leaves edit mode, and then I type again and everything works fine. But the first character is always lost. For instance if I try to type "George" the actuall thing that the cell will contain is "eorge". And this only happens when I set default values on the BO_SetDefaultValues event handler. If the handler is empty, all work fine.

My SetDefaultValues handler is:

private void ContactBO_SetDefaultValues()
{
  
this.ContactID = Guid.NewGuid();
  this.ContactType = 3;
}

But, when I make a BeginEdit in the current row:

private void ContactBO_SetDefaultValues()
{
  this.CurrentRow.BeginEdit();
  this.ContactID = Guid.NewGuid();
  this.ContactType = 3;
}

then all work fine when inserting new row in a grid which has some rows already. When I try to insert a new row in a grid with no rows at all, the same thing still happens. The first character I type is lost.

I have tried to set default values, on the OnAfterAddNew, OnBeforeAddNew, OnEditingStateChanged events, nut still the same thing happens.

Has anyone seen that before?

Reply
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Hope this help



http://www.devexpress.com/Support/Center/p/CQ57816.aspx



Unbound column and new item row
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search