Problems with grids (standard and DevExpress).


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

As you may remember I'm trying to add code to my BO that will automatically save dirty records as the user moves between rows. I still haven't worked out how to do this when new records and broken rule records are involved and I thought I would see what happens when the StrataFrame navigation bar is used. Doing that test raises the following issue.

I'm using the SF DevExpress Maint Form and, except for a little bit of code in the set defaults area, there is no code in the BO or form. The BO's AcceptRowChangesMode is set to AcceptAfterRowSaved and SetDirtyOnEdit is set to True.

When I open the form the Navigate, Add and Delete works ok. I then closed the form and opened it again. I click Edit but the Save/Undo buttons remain greyed out and, If I make changes, they remain greyed out and I cannot save the changes. If I add a record the Save button is active and when I click Save the new record it is created and my previous edits are also saved. This seems like vanilla processing so maybe I'm missing a configuration step.

I then added the DevExpress embedded navigator which doesn't have an explicit Save button but it does have an 'end edit' which I presume is the same thing. I made couple of changes and the 'end edit' button wasn't greyed out but when I clicked it the changes were not saved. Are you able to confirm if the 'end edit' button should work the same as Save on the SF navigation bar.

Just carrying on from this I created a standard SF maintenance form with a standard Windows Data Grid and dropped the BO on it that I used in the DevExpress tests. I open the form and click the ">" navigation button twice but there is no change on the screen, i.e. focus didn't change to the third record. I then click Delete and third record is deleted. So the current row focus had changed in the grid but it wasn't reflected on the screen.

I closed the form and reopened it. I click on the second row and change a value and click Save. The value then reverts to its original value and I check what was sent to the database and it was an update to the first row (nothing was changed on the row).

At this stage I thought it best to wait your advice. Am I doing something fundementally wrong? Clearly other users can't be seeing these problems else you would be inundated with support calls.

I'm using the latest SF and DevExpress releases.

Cheers, Peter

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You haven't mentioned anything about a BusinessBindngSource for your business object... if you want to bind a business object to a grid, you will need to do so through a BusinessBindingSource.  The BBS implements the IBindingListView, the ITypedList, and the ICurrencyManagerProvider interfaces which are needed to reflect changes to the data to the grid.  I did a quick test here this morning, and when I drop a BO and a BBS on a form and configure it as the data source to a DataGridView, the navigate buttons do move the record pointer in both the business object and the grid.
Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Ben,

Thanks for the feedback - I'm aware of the BBS and I'm definately using it on both types of grid. In fact, from memory, I don't think I can select anything but a BBS as a data source.

Cheers, Peter

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
Peter,

We do not live in the DevExpress controls as you do on a day to day basis.  We do not use DevExpress for our medical system but rather our controls and some of the Infragistics controls.

This has more to do with the functionality of a DevExpress grid and it may be helpful for you to post a question in their forum to see where you may be able to capture an event to save a record.  As I mentioned in a previous post, you will more than likely wan to capture a grid event and place your code there.

Note: This is not the natural design of their grid (or any other grid to my knowledge) do you will need to contact them in order to see what would be the best line of action in order to achieve an automated save on every row.  One of their events should be captured.  Since we do not even provide a wrapper for this control, as it does not need one, you are better off asking their technical support how to do this.

Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

Thanks for the response. Actually, that is why I also tested things using the standard SF grids/toolbar just to confirm it wasn't an issue specific the the DevExpress side of things. However, in the end, it is the DevExpress control that I want to have working and in an 'auto save' mode so I will focus my attention there.

Cheers, Peter

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