Hierarchical WebGrid with custom strongly type classes

43 replies. Last post: May 20, 2010 10:53 AM by Shawn August
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Shawn AugustMember

I have searched the tutorials/samples/forum for a way to bind a custom strongly typed class to a hierarchial WebGrid.  In previous examples, I have used the WebGrid's OnInitializeDataSource event to retrieve a custom strongly typed object/class via a web service and bound to the WebGrid's DataSource property.

 

However, I am having problems using the hierarchal features of the WebGrid. The custom class has is flat and contains both header/child data and a relationship can be formed by various "ID" fields within the object. For example, consider the following data within the TransactionList object (List<TransactionList> data)

TransactionHeaderID  TransactionHeaderName TransactionQueueID TransactionQueueName

1                                  Header 1                         1                                Queue 1

1                                  Header 1                         2                                Queue 2

2                                  Header 2                         3                                Queue 3

 

Is there a way using this data to have Header 1 with Queue 1/2 and Header 2 with Queue 3?

All times are GMT -5. The time now is 2:32 AM.
Previous Next