Using a .NET DataGridView with SF


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks for the points, will check them out.

Edhy Rijo

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
  1. If you are using a DataGridView, the BO rules will show on the broken rules columns when the save is called just as though it would for a textbox, etc.  The ErrorProvider will show within the grid column.  So it just becomes a matter of whether you want to prevent navigation if there are broken rules.  If so, then you can use the RowValidating event of the DataGridView and set the e.Cancel = True if you do not want to allow navigation until the row corrected.
  2. If you will do a For Each...bo.GetEnumerable(), the row position will be automatically saved off and restored and you will not have to do anything to retain your current position.
  3. If you are referencing the same instance of the BO on the form and the grid, then the CurrentRowIndex will be the same.

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
I am using a DataGridView with a BBS generated with "SF Custom Business Binding Source", I just selected "Create a Custom Business Binding Source". I dropped an instance of the BO in the form and in order for the grid to show some data I had to do the following:

Me.TransactionItemsStockBBS1.BusinessObject = Me.BizTransactionItemsStock1




I am using a datagridview because the end user can modify some values in any record in the grid, I need to do the following:

1- Validate the change made by the user in the column. What would be the proper event to do the validation?

2- In the validation, I need to do some calculations with the data in the grid, how to know in which record the grid is positioned to do my calculations, also this calculations involve scanning through the records, I am using a FOR..ENFOR bo.GetEnumerable(), but does know if the record pointer will be moved in the form's BO instance?

3- Will the record pointed be in synch in the form's BO while navigating the grid?

Edhy Rijo

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