I have a collection of objects that I want to bind to a RadGrid. Each object has a "AppName" property, as well as a collection of "Flag" objects. The Flag object has a "FlagName" property. So a simplified example of the object model would look like this:
A sample object might look like this:
(I just typed that out here, so there may be some code errors, but you get the idea)
So I want to use the RadGrid to display the list of all Applications, grouped by AppName, and then show the Flags for each Application below with a CheckboxColumn which will be set based on the IsAssigned bool for the Flag. Is there an example somewhere that shows how to do this? I've tried myself, and searched a bit but I can't find any sample code showing how to wire up a collection with a nested collection to a RadGrid.
As always, your help is appreciated!
Thanks,
Eddie
public class Application{ public string AppName { get; set; } public List<Flag> Flags { get; set; }}public class Flag{ public string FlagName { get; set; } public bool IsAssigned { get; set; }}A sample object might look like this:
List<Application> apps = new List<Application> { new Application { AppName = "Search App", Flags = new List<Flag> { new Flag { FlagName = "Editor", IsAssigned = true }, new Flag { FlagName = "User", IsAssigned = false }, new Flag { FlagName = "Search", IsAssigned = true }, } }, new Application { AppName = "Probe", Flags = new List<Flag> { new Flag { FlagName = "Master", IsAssigned = false }, new Flag { FlagName = "User", IsAssigned = true }, new Flag { FlagName = "Publisher", IsAssigned = true }, } }, new Application { AppName = "Viewer App", Flags = new List<Flag> { new Flag { FlagName = "Editor", IsAssigned = false }, new Flag { FlagName = "Baker", IsAssigned = true }, new Flag { FlagName = "Search", IsAssigned = false }, } }};(I just typed that out here, so there may be some code errors, but you get the idea)
So I want to use the RadGrid to display the list of all Applications, grouped by AppName, and then show the Flags for each Application below with a CheckboxColumn which will be set based on the IsAssigned bool for the Flag. Is there an example somewhere that shows how to do this? I've tried myself, and searched a bit but I can't find any sample code showing how to wire up a collection with a nested collection to a RadGrid.
As always, your help is appreciated!
Thanks,
Eddie