Is there a way for an bound grid with an unbound column to contain a custom object such as a Hashtable? If so, how would it be implemented?
Thanks
1 Answer, 1 is accepted
0
Jack
Telerik team
answered on 15 May 2009, 09:21 AM
Hello Bill,
Yes, this is possible. However, I am not sure that this is the best option. Hashtable(s) require large amounts of memory and when using them in a grid with a lot of rows you could easily run out of memory.
To create an unbound column which data type is hashtable follow these steps:
1. Create a new column and set its DataType property to Hashtable
2. Use the Value property of GridViewCellInfo to set the value
3. Handle CellFormatting event to display the value
And here is the code:
// Create the columm
GridViewDataColumn column = new GridViewDataColumn("Hashtable", "");