views:

403

answers:

2

Hey Everyone,

Say I have a RadGrid that shows info on what a customer has ordered. The master table view is all customer-related info. When expanded, the detail table contains info about the item the customer ordered.

Now, here's the tricky part: We sell items that we call a "Kit"; essentially they're multiple skus ordered under one sku. Think along the lines of a holiday gift basket, where the customer would order the basket, but they're actually ordering 3 items; say a box of candy, a t-shirt, and a gift certificate.

What i would like to have is another detail table view under the first detail table for these kit items. So, you could click to expand the customer record, and then underneath it, you'd see the items they ordered. In the case of a kit, you'd be able to expand that as well, and see the individual kit components. You shouldn't be able to expand an item that is not a kit however.

Can anybody out there point me in the direction of a good tutorial, or give me any suggestions?

A: 

You can look at this for an example of the three level hierarchy. Each GridDataItem has a property for "CanExpand". You should be able to use some custom logic to determine if the package was a kit, then set the CanExpand for that row to true, otherwise false:

theGridDataItemItem.CanExpand = false;

I would first try the ItemCreated event for the custom logic.

This may also help: Hiding expand/collapse images when no records

Sean
Thanks; that looks like a good starting point.One note though; apparently CanExpand is a read-only field.
Jim B
A: 

grdDataItem["ExpandColumn"].Enabled = false;

This may help you!

Kishore