Is this possible? This has been asked by other people as well, but no answers?
Andries
4 Answers, 1 is accepted
Hi Andries,
You can not add GridViewRows runtime to the RadGridView without it being bound to some kind of collection.
However a workaround would be to bind the grid to an empty collection and populate it runtime.
If the collection is capable of notifications , the grid will automatically update the UI with the new items. ( e.g. ObservableCollection).
Now the tricky part: The object is not strongly typed, so you do not know its structure until runtime. Therefore you should build the RadGridView columns runtime by adding new GridViewDataColumn object to the RadGridView.Columns collection for each property of your custom object.
Then to represent the custom object in a row we may use List<object> e.g. each row will be a list of objects representing the properties of your custom object. Each property of your custom object maps to an item of that list.
We put this rows in another list to form usable datasource for the grid so the final result would be:
List<List<object>>
So what you need is to convert the data you want to display to a "list of list of objects".
As I have mentioned in another thread where we discussed the same problem, I will be glad to prepare a sample for you. What I need is just your implementation of the data. Then I can prepare for you the code to populate the grid from your custom data runtime. I appreciate your understanding that since your scenario is quite specific we can not provide a general example for it.
Sincerely yours,
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.

I have posted a sample solution here.
Kind regards,
Pavel Pavlov
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
