CSLA Databinding with mono

CSLA Databinding with mono

Old forum URL: forums.lhotka.net/forums/t/10207.aspx


TygreWolf posted on Saturday, March 26, 2011

Hey guys,

So I've been working on a project using the latest CSLA from the SVN.  I have it compiled and it seems to be working on Mono quite well except with one issue - databinding.  Binding CSLA objects to comboboxes and datagridviews works just as it should in Windows Forms (using BusinessBindingListBase and the .NET Framework), but once run in Mono (Windows or Linux), databinding craps out.  Datagridviews do not get populated with data, and comboboxes act extremely flaky.

The general rule is that if it works in Windows and doesn't work in Mono, then it's a Mono bug.  Fair enough.  Is there another alternative for databinding the business objects to the form that might work relatively well in Mono (aside from just manually populating the controls with data) that I might be overlooking?

Simply enough, I'm just using a Windows BindingSource object, and setting its datasource to my business objects when the form loads (with the occassional BindingSource.ResetBindings(false) methodcall). The form controls are just bound to the BindingSource.

Thanks for any advice.

-Jason

JonnyBee replied on Saturday, March 26, 2011

Hi Jason,

I've been working on csla.mono and had the same experience.

BindingSource in Mono does not work properly with objects and I have no workaround to offer. Confused

One possibility might be to reimplement BindingSource or contribute updates to BindingSource in Mono but this is fairly complex code. 

BTW: Look out for Csla 4.2 - read more here http://www.lhotka.net/cslanet/Roadmap.aspx

TygreWolf replied on Sunday, March 27, 2011

Hey Jonny!

First off, thanks for all the hard work in getting this ported over to Mono.  Unfortunately for my current project I don't have the time to take on such a daunting task as rewriting BindingSource in Mono (thought it sounds like a cool side-project).  Looks like spaghetti code is what I'll be using for this task.

As far as CSLA is concerned, though, everything seems to be working great so far with the code I have.  We'll just have to wait and see what the future of Mono holds as far as the support for System.Windows.Forms goes.  I know that BindingSource isn't the only thing they're having difficulties with (SplitContainer currently crashes Mono, even).  Too bad GTK# doesn't support databinding at all.  That may have been a good approach, as well.

Thanks again!

-Jason

kathlencal replied on Monday, March 28, 2011

JonnyBee

Hi Jason,

I've been working on csla.mono and had the same experience.

BindingSource in Mono does not work properly with objects and I have no workaround to offer. Confused

One possibility might be to reimplement BindingSource or contribute updates to BindingSource in Mono but this is fairly complex code. 

BTW: Look out for Csla 4.2 - read more here http://www.lhotka.net/cslanet/Roadmap.aspx

 

Thanks a lot for that link. It helped me a lot. :)

 

 

how to get rid of blemishes
garlic breath tips plr
private label rights how to cure diarrhea
back ache how to get rid of bronchitis
do it yourself carpet cleaning

Copyright (c) Marimer LLC