New Silverlight 3 Behavior for Toggling DataGrid Row Detail Visibility

I was chatting with a customer last week about how they were using Silverlight for their B2B portal.  They were having some difficulty with showing and hiding the DataGrid component’s Row Detail template programmatically.  I found a WPF-oriented solution to the problem on StackOverflow and adapted it to an Expression Blend Behavior to make the solution more modular and reusable.

I posted the behavior with a sample to the Expression Gallery.  If you try it out, please give it an appropriate rating.

image

Comments

  • Anonymous
    February 08, 2010
    It works nicely Michael, however the data grid has an underlying bug which would prevent me from being able to use your behavior. In the Expression Gallery example, if you open up a couple of row's details sections and then try to scroll the grid you will see the bug in action. This particular bug doesn't seem to have a work around and I think it is baked into the grid's measure routine. It has stopped me using the grid a couple of times because it's such a jarring glitch.

  • Anonymous
    February 16, 2010
    Yes, I have encountered this bug also in my own attempt have individual rows with the DetailsTemplate visible in some cases (ie. if there are errors to be displayed) and not visible in others. The scrolling is a bit jarring. I hope this is fixed in a new version of the Silverlight Toolkit soon!

  • Anonymous
    February 16, 2010
    I have filed an issue for this glitch in the DataGrid. http://silverlight.codeplex.com/WorkItem/View.aspx?WorkItemId=5398 Please vote for it!