StrataFrame Forum

Anyone using DevExpress Grid?

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

By Robert Linton - 3/15/2006

Wondering if anyone here is using DevExpress components, specifically their Grid Control, with SF?

I'm having a few issues. One is that the BO's current record does not seem to be staying in sync with the focused row. For example, the attached screen shot shows the "Hindi" row selected, if I press Delete on the MaintenanceFormToolStrip, the first row ("German") will be deleted...not "Hindi" as expected.

Secondly, if I edit "Hindi" to "East Hindi", the Save button is not Enabled as usual when I leave the row, yet, when I exit the form, it automatically asked me if I want to save the changes. Upon confirmation, all changes are saved correctly.

Finally, I cannot use the design time editor because the component does not recognize the BO as a datasource...I have to assign the datasource programatically...would be nice to have design-time support...but that's secondary.

Any clues?

TIA,

Rob

By Trent L. Taylor - 3/16/2006

We are also going to release a DLL that completely wraps the DevExpress controls.  The wrap provides seamless integration for teh DevExpress controls into StrataFrame.  This will be available the same time as the LinkManager. StrataFrame has two interfaces that allow you to interface any third-party or custom control into the framework: IBusinessBindable and ILocalizable.

If you do not need localization support and need binding, then only the IBusinessBindable interface is needed.  We will let you know as soon as the DevExpress wrapper is available.  If you need to do something immediately let me know and I will send you a sample on how to implement the IBusinessBindable interface. Wink

As for your current situation the problem you are having with the delete is because the Grid is not navigating the business objects record index.  There are a lot of ways to move the record pointer of the BO.  When the grid repositions itself, you will need to capture an event to Sync the BO record.  There are a lot of ways to reposition:

MyBo.Move...()
MyBo.Navigate()
MyBo.NavigateToPrimaryKey()
MyBo.SeekToPrimaryKey()

By Larry Caylor - 3/16/2006

Any plans for an Infragistics wrapper?  If not, is the IBusinessBindable interface failrly easy to implement on multiple controls?

-Larry

By Robert Linton - 3/16/2006

Thanks Trent,

For the benefit of anyone else using DevExpress, I'm handling the FocusedRowChanged Event to keep things in sync:

private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
   // Get the current focused row
   DataRow dr = gridView1.GetDataRow(e.FocusedRowHandle);

   // Sync the BO
   languagesBO1.SeekToPrimaryKey((int)dr.ItemArray[0]);
}

Rob

By Trent L. Taylor - 3/17/2006

Great!  Thanks.
By Kevin Lingofelter - 3/17/2006

Larry Caylor (03/16/2006)
Any plans for an Infragistics wrapper?  If not, is the IBusinessBindable interface failrly easy to implement on multiple controls?

I'm curious about this too. Any news?

By Trent L. Taylor - 3/17/2006

We are going to release a wrapper for DevExpress first and then we will look at adding a wrapper for the Infragistics classes.  You can implement the IBusinessBindable interface yourself if you do not want to wait.  The answer is, "Yes," we will ultimately release a fully integrated wrapper for Infragistics, I just cannot give you an exact timeline.  But hopefully we will have this available by the end of April beginning of May.
By Larry Caylor - 3/21/2006

Great!  In the meantime could you provide a sample on how to implement the IBusinessBindable interface?

 

-Larry

By Trent L. Taylor - 3/21/2006

If you will be binding to a grid, you really do not need the IBusinessBindable interface since the grid will interact with the CurrentDataTable or CurrentView as its datasource.  However, I would be more than happy to send you a sample on how to implement the IBusinessBindable interface.  What language do you use, I can't remember BigGrin
By Larry Caylor - 3/21/2006

A VB example would be helpful. I wanted to get an idea of what is involved in implementing the interface for an Infragistics UltraTextEditor or UltraComboEditor control.

-Larry

By Trent L. Taylor - 3/21/2006

Sounds good.  I will send you an example tomorrow.  In fact, I will post the sample on the forum so other users can see how to do this as well.
By StrataFrame Team - 3/24/2006

FYI, Rob,



The version that supports compound primary keys also implements IBindingListView and ITypedList on the BusinessLayer class (all business objects), so you can now assign a business object directly as the data source for a grid. This also solves the problem of needing to re-assign the data source each time you fill the business object (because the internal data table reference changed).



Additionally, when you Add and Delete records, it uses the appropriate methods on the business object to ensure that the proper hook events are fired (such as SetDefaultValues).
By Robert Linton - 3/24/2006

Hi Ben,

Very cool, now that you've implemented the I-faces I see the BO in the drop-down list for DataSources.

However, I attempted to assign a simple BO to a SF ComboBox DataSource and Assign my text value to DisplayValue, I get the following error at runtime:

"Items collection cannot be modified when the DataSource property is set."

ApplicationException
 An error occurred while creating the main form
TargetInvocationException
 Exception has been thrown by the target of an invocation.
ArgumentException
 Items collection cannot be modified when the DataSource property is set.

By StrataFrame Team - 3/24/2006

Rob,



The reason you're getting that exception is that .NET will not allow you to manually add items to a combo box when you set the DataSource property to an object. So, make sure you don't have items in the combo box. Also, make sure the PopulationType property is set to Manual.



However, the SF ComboBox was designed to be populated using a business object through the PopulationDataSourceSettings property, not by setting a business object as the data source directly. You might give it a try. There's a tutorial topic on ListControl Population under Getting Started -> Tutorials -> Creating a WinForms App [VB] -> List Control Population.
By StarkMike - 4/27/2006

Hi Guys, I'm very excited w00t about you guys creating a DevExpress wrapper so that their Grid product can be used seamlessly with StrataFrame. How will you guys be notifying us when the wrapper is ready? The forums or a mass email to registered users?



P.S. I'm just curious... What made you choose to create a DevExpress wrapper first out of all the other grid products?



Thanks


By StrataFrame Team - 4/27/2006

Mike,



We'll be notifying people through a mass email on the forum. As for choosing DevExpress first over other grid products, we had several users specify that they wanted to use DevExpress controls (no one really mentioned anything else). As for the grid itself, we aren't going to subclass it other than to create a "list" that works similar to our current ListView (in details display mode). You can already use a DevExpress grid with a business object as the data source, so we aren't going to create a custom wrapper for the GridControl or GridView.
By Steve L. Taylor - 4/27/2006

An Infragistics wrapper is not a function of development -- it is a legal issue.  We are currently waiting on a ruling from Infragistics' legal department.  Their current stance is we can't distribute a wrapper without violating their license.  I know it seems crazy all it would do is help them sell more copies.

 

Nevertheless, they will not respond to our requests.  If you want a wrapper you need to contact their sales department and nudge them along.

By Larry Caylor - 5/8/2006

Last week I sent an e-mail off to Infragistics Sales asking them if I should switch to Dev Express controls if I wanted something that would be easy to use with your Framework. I received an email back this morning saying that they would contact you. Hopefully both companies will work things out and we’ll get an Infragistics wrapperSmile.

 

-Larry

By StrataFrame Team - 5/8/2006

Yes, as a matter of fact, they contacted us just a few minutes ago.  We'll let you know the results of our correspondance with them Smile
By Kari Paukku - 5/8/2006

Hi,

What is the situation with the DevExpress wrapper?

Kari

By Daniel Essin - 5/8/2006

As a related question, how come you provided a customized version of the ListView but not the DataGridView? It offers a lot of useful functionality (such as column sorting). I tried to bind a BO directly to the MS DataGridView and it only displays the first row of the result set (leaving the other 189 invisible).
By StrataFrame Team - 5/9/2006

The reason it only shows the first row is because that is the default functionality of the business object.  On the business object that you bound to the grid, set the "IsListSource" property to true, and the other 189 records will be visible.  That property determines how some of the property descriptors are handled.
By Trent L. Taylor - 5/9/2006

Kari,

The DevExpress wrapper is just about complete.  We put more work into it to make it more like our standard collection.  We even added some additional functionality into the BrowseDialog that does not exist in the standard BrowseDialog and created a control called an EnhancedList that is similar to the behavior of the standard collections ListView.

We will make the Wrapper available online probably next week for download.  However, there have been some modifications to the framework itself to allow for this type of functionality and we are going to make that available as well first since the DevExpress wrapper will require those changes.

So in short, it will be next week sometime when you can get your hands on the wrapper.  Hope this helps.Wink

By Daniel Essin - 5/9/2006

oh



I hope You're collecting these gems for the Help file.
By StrataFrame Team - 5/9/2006

Oh, yes, we have a continually growing list of topics that need to be updated and/or written.
By Larry Caylor - 5/30/2006

Any progress with Infragistics on providing a wrapper for their controls?

-Larry

By StrataFrame Team - 5/30/2006

We're having a few problems dealing with their legal department.  Essentially, if we create a wrapper, we have to be come a reseller/distributer for them and package their product with ours, like DeKlarit does... the jury is still out, sorry Ermm
By Wayne Van Rooyen - 6/1/2006

To solve this in the meantime could you not post a sample file/code so we can use their controls.
By StrataFrame Team - 6/1/2006

Yes, Wayne, the simplest way to implement an inherited Infragistics control would be to copy the source code from a StrataFrame control (such as TextBox) and modify the code file to inherit from the desired Infragistics edit control.  However that requires a purchased license (to give you the source code).  If you don't have a purchased license, then you can find a sample here: http://forum.strataframe.net/FindPost777.aspx
By Wayne Van Rooyen - 6/1/2006

Hi Thanks,
I have managed to follow the article for an edit box. I was really having trouble with the datagrid from Infragistics.
Regards WAyne
By StrataFrame Team - 6/1/2006

I don't have any controls from Infragistics loaded on my computer.  We don't have an inherited grid, since the BusinessBindingSource allows you to use a business object as a standard IBindingListView which can be set as a DataSource on any grid.

Is there a specific problem you were having with the Infragistics grid?

By Wayne Van Rooyen - 6/1/2006

Hi,

I cant seem to get the columns of the grid to autopopulate from the bindingsource, so this causes me to have column names like cust_pk and cust_fname

Regards Wayne