<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Can I add columns to a relationship tab dynamically?</title><link>https://www.aras.com/community/f/development/5703/can-i-add-columns-to-a-relationship-tab-dynamically</link><description>How do I add a column to a relationship tab dynamically. 
 I wish to federate an ItemType, the number of columns returned depends on the dataset and query combination and cannot be predicted prior to the query being run. Typically I would expect 30-40</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Can I add columns to a relationship tab dynamically?</title><link>https://www.aras.com/community/thread/2478?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 14:41:25 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e094c014-a868-4552-966f-fb944a0cba6f</guid><dc:creator>Christopher Gillis</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;strong&gt;getVisiblePropsForItemType&lt;/strong&gt; function will return the properties on an ItemType that have&amp;nbsp;&lt;strong&gt;is_hidden&lt;/strong&gt; set to True.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m less familiar with the&amp;nbsp;&lt;strong&gt;uiInitItemsGridSetups&lt;/strong&gt; function, but&amp;nbsp;I believe it checks to make sure that the column order and column widths in the current user&amp;#39;s Preferences are valid. These Preferences are used to reload the order and width of the columns that a user had set the last time they viewed the grid.&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
&lt;p&gt;Christopher Gillis&lt;/p&gt;
&lt;p&gt;Aras Labs Software Engineer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I add columns to a relationship tab dynamically?</title><link>https://www.aras.com/community/thread/2474?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 10:07:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6520b552-8aae-4408-815d-51d18cf184b7</guid><dc:creator>Meismart</dc:creator><description>&lt;p&gt;Hi Angelalp,&lt;/p&gt;
&lt;p&gt;I think the functionality I want exists in Client\javascript\item_window.js which refers to ItemsGrid&lt;/p&gt;
&lt;p&gt;Looking in \Client\javascript\ItemsGrid there seems to be 3 files:&lt;br /&gt;MainGridFactory.js defines which scripts to use for each ItemType - I think I want to create an Overload for my custom ItemType&lt;/p&gt;
&lt;p&gt;BaseItemTypeGrid.js calls:&lt;br /&gt;&amp;nbsp;visiblePropNds = aras.getvisiblePropsForItemType(currItemType);&lt;br /&gt;&amp;nbsp;aras.uiInitItemsGridSetups(currItemType, visiblePropNds);&lt;/p&gt;
&lt;p&gt;By creating my customItemTypegrid.js I believe I could populate the visiblePropNds with my custom nodes.&lt;/p&gt;
&lt;p&gt;I have not yet found&amp;nbsp;how getvisiblePropsForItemType or uiInitItemsGridSetups works, but that is where I plan to look next. uiInitItemsGridSetups&amp;nbsp;takes the ItemType as an argument, so this too may need modification to work.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not great at JavaScript, so I haven&amp;#39;t tried&amp;nbsp;modifying anything yet.&lt;/p&gt;
&lt;p&gt;Many thanks,&lt;br /&gt;Martin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I add columns to a relationship tab dynamically?</title><link>https://www.aras.com/community/thread/2469?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 12:23:02 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:060c4951-93d3-4701-9f91-5147a9517747</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi Meismart,&lt;/p&gt;
&lt;p&gt;I do not know a solution, but I am also interested in this use case. But I don&amp;acute;t think this one is easy to solve. Some ideas:&lt;/p&gt;
&lt;p&gt;1. Dynmically show/hide columns&lt;/p&gt;
&lt;p&gt;I think this is possible, but I am not sure if it will also work for federated content. The property selector in the grid does something similar.&amp;nbsp;I assume the corresponding file is&amp;nbsp;&amp;#39;columnsSelection.js&amp;#39; in the codetree.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you have the max amount of columns (200), do they include the same columns as used for the other use cases? When all properties are included in your ItemType, it&amp;acute;s maybe possible to use some kind of filter matrix to select which kind of columns you want to show/hide.&lt;/p&gt;
&lt;p&gt;2. Create columns dynamically.&lt;/p&gt;
&lt;p&gt;I wonder if it&amp;acute;s possible to create an ItemType which dynamically generated federated properties. Probably not a good idea. &lt;br /&gt; But do you really need the&amp;nbsp;standard grid? Or are also other view options sufficient? Maybe it&amp;acute;s possible to use a standard Form in the relationships that renders a custom grid. An example for a custom grid rendering can be found in this project: &lt;a href="https://github.com/ArasLabs/my-recent-items"&gt;https://github.com/ArasLabs/my-recent-items&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>