Friday, June 29, 2012

Telerik RadGridView Hierarchical Data (Child Grids) for Winforms Gotcha

The Gripe
I have been banging my head against a wall since yesterday trying to figure out what the hell I was doing wrong with my RadGridView's Hierarchical Child Grid. I configured it, re-configured it, blew it away, did it again. I got it working, then it randomly stopped working. I was quite livid at this point, so I called it a day and figured I would leave this problem for today.

Well today came around and I found the problem. I am calling this a bug and a gigantic fuck you Gotcha from Telerik. So this is obviously not intentional behavior, it is a bug, but this bug just wasted almost two whole work days for me to figure out. I thought I was doing something wrong and the whole time it turns out my configuration was fine, it is the control itself that is flawed.

Here are relatively clear instructions from Telerik on how to create GridViews with Hierarchical Child Grids:
http://www.telerik.com/help/winforms/gridview-hierarchical-grid-tutorial-binding-to-hierarchical-data.html

I am thinking about re-doing the article on my blog for actual objects and not DataSets, because let's face it, no offense, but if you are using DataSets directly with your grid you are probably doing something wrong. That isn't a clean or safe approach.

The Gotcha
If you followed all of the instructions as described in the above link and you are 100% sure that you did everything correctly then here is the gotcha:

If you click directly on the + sign of the row, you will not see any child rows!

The Work Around
You MUST click on the row itself first to make it active, THEN you can click on the + sign to show the child rows.

I don't understand why this is happening, but it does. Here are screen shots of what I am talking about, I can reproduce this behavior, so this isn't a baseless complaint:




How am I supposed to explain to users that this is how it works? This is a bug plain and simple. The moment a user experiences something like this I would get an phone call or email complaining about it.

I am not sure if this is fixed in the latest version of Telerik, but for the record I am using "RadControls for WinForms Q1 2012 SP1".

Update (07/12/2012) - I upgraded to Winforms Q2 2012, this did not fix the problem.

If I am doing something wrong, reply below and set me straight please.

If I find a solution first I will update this post.

1 comment: