Grid Control


Author
Message
Sarosh
Sarosh
StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)
Group: Forum Members
Posts: 22, Visits: 116
Hi!

How come I don't see a Grid Control in the StrataFrame toolbox?

I am missing something?

Sarosh

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sarosh.

You can just use a standard .NET GridView control, or a third-party one.

Then, drop a BusinessBindingSource onto your form to allow native data binding. Have a look at the Help File, under :

Application Framework / UI Layer / Controls / Business Binding Source

Hope it helps.

Cheers.

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
Ivan is correct.  There is no need for us to create a grid of our own since you can use any grid product that you like, including the standard .NET grid.  I recommend looking at the BusinessBindingSOurce sample that comes with StrataFrame.  This will give you a much better understanding of how to use a grid with StrataFrame.
Sarosh
Sarosh
StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)
Group: Forum Members
Posts: 22, Visits: 116
Hi!

Ok but in that case why have the other controls like the Checkbox, button ListBox in the toolbox?

Does it not make sense to subclass the DataGridView and put it in the toolbox even if nothing else added to the subclass?

Sarosh

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 but in that case why have the other controls like the Checkbox, button ListBox in the toolbox?

Because these classes implement our IBusinessBindable interface and provide native data binding.  It is one for one and these controls do not use the IBindingList interface like a grid or report will.  You can actually use the BusinessBindingSource to natively bind to any other 3rd party control as well but lose a bit of the SF functionality as it relates to automated enables/disables.

Does it not make sense to subclass the DataGridView and put it in the toolbox even if nothing else added to the subclass?

Not really....this is a nother beast entirely.  We could do this....but it would not buy you anything.  If you look at an Infragistics grid in the object browser and look at its derived type, it ultimately inherits off of a DataGridView. They have an entire team of developers that work on this one control...in fact, if you look at their source code they have comments that go back 7 years!  The only purpose of us inheriting a DataGridView is if we were going to overwrite base functionality and really extend the DataGridView.  After looking at all of the grids on the market, it is flooded with wonderful grids so it just did not make sense to do this....so we provided the BusinessBindingSource that allows you to tie into any of these 3rd party or standard .NET grids.

Sarosh
Sarosh
StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)
Group: Forum Members
Posts: 22, Visits: 116
Hi!

Thanks for the explanation.

I tried adding a .NET DataGridView on a Maintenance From inherited from "MicroFour.StrataFrame.UI.Windows.Forms.StandardForm" which has a MaintenanceFormToolStrip on it and also added a Business Object (generated by the Business Object Mapper) and a BusinessBindingSource, set the BusinessObject on the BBS to the BO and set the grid's DataSource to the BSS and then in the BO's ParentFormLoading called BO.FillAll() method.

Everything works fine, the grid show all the rows properly but the buttons on the toolstrip don't seem to work in sync with the grid. i.e. If I click the Next button on the ToolStrip it doesn't move the row in the grid. In fact no matter which button I click on the ToolbarStrip it seems to have no effect on the grid.

What am I doing wrong here?

Thanks

Sarosh


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
rows properly but the buttons on the toolstrip don't seem to work in sync with the grid.

The MaintenanceFormToolstrip is not going to work with a Grid in this fashion.  The reason is that a BusinessBindingSource wraps a BO and implements the IBindingList interface which grids need in order to display and enumerate all of the rows in the data source at once.  The MaintenanceFormToolstrip interacts with the BOs directly and thus the normal interaction does not work the same.  If you look at the BusinessBindingSource sample that comes with the framework, you will see how to implement this type of functionality outside of the MaintnenaceFormToolstrip.

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
The BusinessBindingSource also implements the ICurrencyManagerProvider, which will sync the grid's active row with the Navigate() methods on the business object (used by the MaintenanceFormToolstrip).  Most likely, the grid has it's "SyncWithCurrencyManager" property set to false (I'm not sure of the property name on the grid, but it has something to do with synching with the CurrencyManager).
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I have a DataGridView working on a form using BusinessBindingSource but can't seem to find any property of the grid relating to SyncwithCurrencyManager ( or anything re currency manager )



I have bound controls on the form for a single record and would like to refresh those control as the user navigates the ( readonly ) grid.



Ben - anymore clues on the property you mentioned?



Second part of question : can anyone point me to help re incremental searching in DataGridViews or the browse that comes with the SF browsedialog ? ( ala VFP - start typing in column and it seeks next matching record etc )



TIA



Charles
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
If you will open up the BusinessBindingSource sample, it has the Next - Previous links that navigate the grid.  Have you looked at this sample to see how this is implemented?

can anyone point me to help re incremental searching in DataGridViews or the browse that comes with the SF browsedialog ? ( ala VFP - start typing in column and it seeks next matching record etc )

When 1.6.1 is released you can implement your own incremental search in a browse since the ListView is exposed through an InfoPanel control.  A ListView already has incremental search capabilities.

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