Altinet
  • Home
  • Blog
  • Contact





Silverlight DataForm ramblings

On 21 Dec, 2010
Silverlight
By : Bruno Samardzic
With 1 Comment
Views : 4537

For the last few weeks i have been struggling with the DataForm control from the Silverlight toolkit. The control itself has some nice features, but it shows some strange quirks from time to time. It’s pretty bossy, in a way that it likes to control the collectionview it’s binded to and also does some strange stuff to the collection. One of the biggest issues i had with it was the following:

– If I would add a new item to the collection from code, the dataform would try to commit it immediately. Which basically means that the “Cancel” button wouldn’t do anything, and it should cancel addition of a new object to the collection. This is just one of the problems, but it’s the stuff you don’t really want around, and that can get really annoying and also lead to some nasty bugs.

I also didn’t care much for navigation and CRUD buttons: if i want those i’ll do it on the side somewhere. Yet they felt like they introduced unnecessary complexity. So the solution i ended up with is downloading the Silverlight toolkit source and doing some tweaks and modifications. I also renamed it to SlimForm, as well as everything around it (DataField became SlimField and such) just to keep things divided and clean. I did some tweaks from the get go, the solution is (for now) cooperating much better with my custom CollectionViews (which i’ll also get online soon i hope), i got rid of the navigation and CRUD stuff, some Resharper refactoring and that’s basically it! My aim is to make it as passive and responsive as possible, without sacrificing the validation and editing functions, which i only care about. This is a first take on the whole thing, but it’s so refreshing to have control over those tricky behaviours, instead of jumping through hoops and doing some weird workarounds. Not much work went into it, but it’s gonna save you an hour or 3:) HTH! Download link: SlimForm



Previous Post Next Post 

About The Author

Bruno Samardzic


Number of Posts : 45
All Posts by : Bruno Samardzic

Comments ( 1 )

  • Dataform, Ria Services, Combobox and Validation « run80 Feb 02 , 2011 at 9:10 am / Reply

    […] As you may figured out from 1 of my previous posts, i’m not a big fan of Silverlight Dataform control, although I do like some of the capabilities presented there. In fact, after numerous frustrations with it, i decided to roll my own customization of it, rip out everything i didn’t need and adjust it to act the way i like it. You can find my first stab at it in this post. […]


Leave a Comment

Click here to cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>





Recent Posts

  • Angular vs React: round 2
  • Why programming is hard
  • Orchard Workflows, undocumented gem
  • The React Redux
  • React.js invoicing CRUD application, part 2: Description

Recent Comments

  • Angshuman on Animation for starred grid rows and columns using xaml
  • Advanced Excel Training in Lucknow on Angular vs React: round 2
  • Reginald Sophomore on My example of Angularjs directive
  • Slobodan on Angular and Breeze – story so far.
  • Bruno Samardzic on Reaction to Ember-forged Durandal Angularly Knocking out my Backbone, or my JS MVC framework research conclusion.

Contact

Altinet d.o.o.

OIB: 97429091194

Čulinečka cesta 146, Zagreb

Tel: +385 (1) 2946 819

Mob: +385 (98) 210 756

IBAN: HR4323400091110406470

Latest tweets