StrataFrame Forum

Master-Detail DatagridView

http://forum.strataframe.net/Topic4401.aspx

By Fernando Ramirez - 11/14/2006

Hello Guys,

I have the following master-detail scenario:

A company table and BO

A Dept table and BO

A DataGridView with a BusinessBindingSource

Everything works as expected. I'm able to include my grid to participate in the editing etc. etc. nice!!!

Questions:

1. I have a button to add a row to the "DeptBO". Works as expected. What I need is that after adding the new row to send the user to the new added row in the grid. If I call the "Me.DataGridView1.Focus()" I get to the grid but not to the "new" row. I tried Add(), NewRow() in combination with "NavigatetoPrimaryKey" etc. but no luck.

2. If I enter data into the grid and then save everything goes as expected. If I programatically change my DeptsBO through the calling of a button and then saving the values I don't get the results to be saved.  (Similar code to the sample provided in "Saving and Other Programmatic Access" documentation). If I do both (grid & through code) the data on the grid gets saved but not the one through code. Need to "sync" BO with Grid.

3. Need the equivalent of "AfterRowColChange" (Visual Foxpro) in DataGridView. It must be simple but I cannot figure which one is the right one to use and form that matter how to "sync" the row movement in the DataGridView with the BO. Is this done for you?

I spend tooooooooooooooo much time trying to figure the above. Any ideas.

Thanks

Fernando

By StrataFrame Team - 11/14/2006

What version of SF do you have installed, Fernando?  The scenario you are describing is handled by the CurrencyManager of the BusinessBindingSource, and the ICurrencyManagerProvider interface was not implemented on the BBS until the latest version.  So, until the latest, grids attached to the BBS did not reflect the selected row choosen by a Navigate() call on the business object, but now it does.  Most likely your other issues are stemming from your record pointer being out of sync.
By Fernando Ramirez - 11/14/2006

Hello Ben,

I'm always one download behind. Will download the latest and try. Will let you know

Thanks,

Fernando

By StrataFrame Team - 11/14/2006

Awesome, keep me posted Smile
By Chan - 11/17/2007

Hi,

Are you able to make DevExpress DataGrid record pointer sync with SF BBS?

I have checked out the SF sample, and that grid sync well. However, I tried DevExpress, it just not working.



Is it DevExpress problem or SF?



Please advice.
By Chan - 11/17/2007

Hi,

I just found that, it didn't work is because that is brokenrule in current row, which cause BO not navigate.
By Trent L. Taylor - 11/19/2007

Glad you found your problem.