DevExpress grid, new row, misses first letter on edit


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
OK...this ended up being an issue with how the DevExpress XtraGrid refreshes itself.  I know that we have a large number of users using an XtraGrid and I would have to go back to previous versions to see if this issue manifested itself in those versions, but here is the problem and how to fix it.

DevExpress is handling the Changed event of each individual strong-typed property, so when the Changed event is raised it is refreshing the grid...but it is NOT updating the property value before it refreshes...so it is a "catch 22" type of situation.  To work around this, we have added two methods PauseChangedEvents and ResumeChangedEvents on the Business Objects (BusinessLayer class).  In the top of the SetDefaultValues method, call this.PauseChangedEvents and once the properties have been set, call this.ResumeChangedEvents.  This will prevent the grid from stripping the text.

Copy the attached assembly into your GAC (c:\windows\assembly) and copy both the DLL and XML to the c:\program files\Common Files\MicroFour\StrataFrame folder.

This should get you going Smile

Obviously this will be included in the next update Wink

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