DevExpress grid, new row, misses first letter on edit


Author
Message
George Nentidis
George Nentidis
StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 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 (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I was facing the same problem. After long time investigation from DevExpress and SF team, I give up to use new row in XtraGrid with SF BBS.



I have posted this to SF team but haven't get any reply.



However, according to DevExpress team (I sent them sample project, and they tried using SF trial version) the way of SF BBS binding is a bit weird for them which is not compatible with xtragrid. They provided some workaround but cause another problem. At last, they recommend me to not use new 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