{"action":"created","issue":{"url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/19","repository_url":"https://api.github.com/repos/umco/umbraco-fluidity","labels_url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/19/comments","events_url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/19/events","html_url":"https://github.com/umco/umbraco-fluidity/issues/19","id":296316762,"number":19,"title":"Requires editor config to display List View properties","user":{"login":"DanDiplo","id":6676168,"avatar_url":"https://avatars1.githubusercontent.com/u/6676168?v=4","gravatar_id":"","url":"https://api.github.com/users/DanDiplo","html_url":"https://github.com/DanDiplo","followers_url":"https://api.github.com/users/DanDiplo/followers","following_url":"https://api.github.com/users/DanDiplo/following{/other_user}","gists_url":"https://api.github.com/users/DanDiplo/gists{/gist_id}","starred_url":"https://api.github.com/users/DanDiplo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanDiplo/subscriptions","organizations_url":"https://api.github.com/users/DanDiplo/orgs","repos_url":"https://api.github.com/users/DanDiplo/repos","events_url":"https://api.github.com/users/DanDiplo/events{/privacy}","received_events_url":"https://api.github.com/users/DanDiplo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-12T09:55:10Z","updated_at":"2018-02-12T10:13:07Z","closed_at":null,"author_association":"NONE","body":"First, I want to say this is an *amazing* project - jaw droppingly good! The number of features and quality of the code and documentation is stunning. I managed to get a simple List View working in about 20 mins from install to running in Umbraco, including reading docs. So that is a testament to how easy it is to use.\r\n\r\nHowever, I was left scratching my head as to why some column data wasn't being displayed. For the project I was working on I only required a read-only list view of some data stored in a table within the Umbraco DB (T-SQL).\r\n\r\nMy POCO was this:\r\n\r\n```\r\n[TableName(\"GradedUrls\")]\r\npublic class GradedUrl\r\n{\r\n    [PrimaryKeyColumn]\r\n    public int Id { get; set; }\r\n\r\n    public DateTime Date { get; set; }\r\n\r\n    public string Url { get; set; }\r\n\r\n    public string Domain { get; set; }\r\n\r\n    public decimal TotalScorePercent { get; set; }\r\n\r\n    public string Email { get; set; }\r\n}\r\n```\r\n\r\nand the relevant bit of config I used was this:\r\n\r\n```\r\ntreeConfig.AddCollection<GradedUrl>(p => p.Id, \"Graded Url\", \"Graded URLs\", \"List of graded URLs\", \"icon-link\", \"icon-link\", collectionConfig =>\r\n{\r\n    collectionConfig.SetNameProperty(p => p.Domain);\r\n    collectionConfig.SetViewMode(FluidityViewMode.List);\r\n    collectionConfig.SetDateCreatedProperty(p => p.Date);\r\n    collectionConfig.SetSortProperty(p => p.Id, SortDirection.Descending);\r\n    collectionConfig.MakeReadOnly();\r\n\r\n    collectionConfig.ListView(listViewConfig =>\r\n    {\r\n        listViewConfig.AddField(p => p.Date, fc => fc.SetHeading(\"Date Submitted\"));\r\n        listViewConfig.AddField(p => p.Url);\r\n        listViewConfig.AddField(p => p.TotalScorePercent, fc => fc.SetHeading(\"Score %\"));\r\n        listViewConfig.AddField(p => p.Email);\r\n    });\r\n\r\n});\r\n```\r\n\r\nWhen I ran this I got a list view, but only the Domain value (the name property) was showing any data. All the other column headings were there, but each row contained no data for any of the properties in the List View. They were completely empty (yet I knew the table contained data and the field names matched the POCO).\r\n\r\nEventually, I tried adding an Editor Config to the `collectionConfig `(to match your example in docs):\r\n```\r\ncollectionConfig.Editor(editorConfig => {\r\n\r\n    editorConfig.AddTab(\"General\", tabConfig => {\r\n        tabConfig.AddField(p => p.Url).MakeRequired();\r\n    });\r\n});\r\n\r\n```\r\nAs soon as I did this the values for the columns were displayed correctly. I'm not quite clear why the `editorConfig` is needed for this. As I say, in my case I was using a read-only view that isn't editable, so I wouldn't have expected to require an editor config to see the values of the properties in the list view.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/comments/364879233","html_url":"https://github.com/umco/umbraco-fluidity/issues/19#issuecomment-364879233","issue_url":"https://api.github.com/repos/umco/umbraco-fluidity/issues/19","id":364879233,"user":{"login":"DanDiplo","id":6676168,"avatar_url":"https://avatars1.githubusercontent.com/u/6676168?v=4","gravatar_id":"","url":"https://api.github.com/users/DanDiplo","html_url":"https://github.com/DanDiplo","followers_url":"https://api.github.com/users/DanDiplo/followers","following_url":"https://api.github.com/users/DanDiplo/following{/other_user}","gists_url":"https://api.github.com/users/DanDiplo/gists{/gist_id}","starred_url":"https://api.github.com/users/DanDiplo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanDiplo/subscriptions","organizations_url":"https://api.github.com/users/DanDiplo/orgs","repos_url":"https://api.github.com/users/DanDiplo/repos","events_url":"https://api.github.com/users/DanDiplo/events{/privacy}","received_events_url":"https://api.github.com/users/DanDiplo/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T10:13:07Z","updated_at":"2018-02-12T10:13:07Z","author_association":"NONE","body":"Hah, that's just the kind of thing I would do, but in this case, \"no\". I can easily reproduce by removing the `editorConfig`, compiling, and then I get:\r\n\r\n![image](https://user-images.githubusercontent.com/6676168/36091872-38519438-0fdd-11e8-9ad2-5d56581fa647.png)\r\n\r\nAs soon as I add it back, compile, I get data in all those blank columns.\r\n"}}
{"actor":{"display_login":"DanDiplo"}}