<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/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>Grids</title><link>https://community.appian.com/discussions/f/user-interface/15052/grids</link><description>Hi all, 
 I am working on creating an interface which act as both editable grid and paging grid based on the rule input value in read only. 
 I am using 2 ruleinputs 
 1)cdt of array type, 
 2) readOnly :boolean, 
 If I select readonly as true, paginggrid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Grids</title><link>https://community.appian.com/thread/67369?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 17:14:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1510c948-62e0-4ac3-8134-4a23237335de</guid><dc:creator>divyak340</dc:creator><description>&lt;p&gt;Hi Krishna Chaitanya,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grids</title><link>https://community.appian.com/thread/67357?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 13:00:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1655335a-0d61-4ff1-b01f-31d168438cb0</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!employees: {
    {
      id: 1,
      firstName: &amp;quot;John&amp;quot;,
      lastName: &amp;quot;Smith&amp;quot;
    },
    {
      id: 2,
      firstName: &amp;quot;Michael&amp;quot;,
      lastName: &amp;quot;Johnson&amp;quot;
    },
    {
      id: 3,
      firstName: &amp;quot;Mary&amp;quot;,
      lastName: &amp;quot;Reed&amp;quot;
    },
    
  },
  a!formLayout(
    label: &amp;quot;Employees&amp;quot;,
    contents: {
      a!gridLayout(
        totalCount: count(
          local!employees
        ),
        headerCells: {
          a!gridLayoutHeaderCell(
            label: &amp;quot;First Name&amp;quot;
          ),
          a!gridLayoutHeaderCell(
            label: &amp;quot;Last Name&amp;quot;
          ),
          a!gridLayoutHeaderCell(
            label: &amp;quot;&amp;quot;
          )
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(
            width: &amp;quot;DISTRIBUTE&amp;quot;,
            weight: 3
          ),
          a!gridLayoutColumnConfig(
            width: &amp;quot;DISTRIBUTE&amp;quot;,
            weight: 3
          ),
          a!gridLayoutColumnConfig(
            width: &amp;quot;ICON&amp;quot;
          )
        },
        rows: a!forEach(
          items: local!employees,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                label: &amp;quot;first name &amp;quot; &amp;amp; fv!index,
                value: fv!item.firstName,
                saveInto: fv!item.firstName,
                required: true
              ),
              a!textField(
                label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,
                value: fv!item.lastName,
                saveInto: fv!item.lastName,
                required: true
              ),
              a!imageField(
                label: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                images: a!documentImage(
                  document: a!iconIndicator(
                    &amp;quot;REMOVE&amp;quot;
                  ),
                  altText: &amp;quot;Remove Employee&amp;quot;,
                  caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.firstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.lastName,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(
                        local!employees,
                        remove(
                          local!employees,
                          save!value
                        )
                      )
                    }
                  )
                ),
                size: &amp;quot;ICON&amp;quot;
              )
            },
            id: fv!index
          )
        ),
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,
          value: {
            startDate: today() + 1
          },
          saveInto: {
            a!save(
              local!employees,
              append(
                local!employees,
                save!value
              )
            )
          }
        ),
        showWhen: if(
          ri!readOnly = true(),
          false(),
          true()
        )
      ),
      a!gridField(
        label: &amp;quot;&amp;quot;,
        totalCount: count(
          local!employees
        ),
        columns: {
          a!gridTextColumn(
            label: &amp;quot;First Name&amp;quot;,
            data: index(
              local!employees,
              &amp;quot;firstName&amp;quot;,
              null
            ),
            alignment: &amp;quot;LEFT&amp;quot;
          ),
          a!gridTextColumn(
            label: &amp;quot;Last Name&amp;quot;,
            data: index(
              local!employees,
              &amp;quot;lastName&amp;quot;,
              null
            ),
            alignment: &amp;quot;LEFT&amp;quot;
          )
        },
        value: a!pagingInfo(
          startIndex: 1,
          batchSize: - 1,
          sort: a!sortInfo(
            field: &amp;quot;firstName&amp;quot;,
            ascending: true
          )
        ),
        showWhen: if(
          ri!readOnly = true(),
          true(),
          false()
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;by using show when condition based on your readOnly rule input you can achieve this requirement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>