Syncing BO and Devexpress Grid when there's a broken rule


Author
Message
Peter Denton
Peter Denton
StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

I've got a BO being maintained in a Devexpress grid. I'm saving the bo if required in the grid's BeforeLeaveRow event, and if the save causes a broken rule stoping the move off that row. My problem is that if I have a column with a sort on it and change a value in that column that will cause a broken rule, as soon as I click onto another row the sort takes effect before the BeforeLeaveRow event, whisking the broken row out from under me (similarly if I apply a sort to a different column if I already have a broken rule in the current row).

I've tried navigating in the grid to try to get back on the broken row, I've tried setting the BO's AutoNavigateToFirstBrokenRow, I've tried navigating and moving in the BO to the Broken row, all to no avail. Anyone have any ideas where I might have gone wrong, or what should work?

Peter

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Sorts...they are always good for causing an issue Smile  I am not familiar with the DevExpress grid off of the top of my head, but the first thing I would think to try would be to handle the SortChanged event (if one exists) on the grid.  This would at least inform you that the sort has changed.  You could then set the sort of the BO to the same value as the grid which would put the rows in the same order.

That would be the first thing that I would try.

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