![]() |
#1 |
Участник
|
In Microsoft Dynamics NAV 2009 in new Role Tailored Client we have new feature – we can show lists in “tree view”. We can expand/collapse nodes and make lists more interesting and more visual.
However this new feature isn’t documented very well and every developer needs to collect his own experience. With this article I will try to make this way easierJ So if we want to see Tree View we need to have: 1. Table with field type Integer. This field will get us major point – will show is record root or fork or leaf. a. Few words about “IndentationColumnName” field; (that how property to indentation field is named on Pages) i. Field could be only type Integer. ii. Allowed values are >=0. I didn’t find upper limit, but because view indentation shift is calculated based on this value then with “big” values filed is indented too far to right that becomes invisible. iii. Root record has “0” indentation. Higher numbers means higher indentation. There could be several “0” records placed on table. 2. Page type List. a. On page designer there must be “Group” & subtype “Repeater” and we need to set on it: i. Property “ShowAsTree” = Yes ii. Property “IndentationColumnName” must be field name we defined in table as indentation field. b. Repeater must include fields we want to see in list. First field in list will be indented and will have ‘+-‘ signs for collapse/expand list. Indentation field could be not included to page. If everything is done (and you have data in the table), then run page. Fortunately for me I have table with some data in it: Few interesting points I want to have your attention:
If we “Expand All” we’ll see: ***Это спам-сообщение*** it works J Please keep in mind:
You see now: first record has primary key 0 and indentation level 5, but next record has level 1 so my first record has no possibilities “collapse/expand”. Record 18 with level 0 is in the end of list and only one record is after it, so “my root records from previous view” now can expand/collapse only one record. And last:
Gedas Busniauskas Microsoft Lithuania Microsoft Customer Service and Support (CSS) EMEA Источник: http://feedproxy.google.com/~r/Micro...ist-pages.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|