[Solved] How to set min width of items in datagrid?

UI Components for Angular
Post Reply
jp_2011
Posts: 35
Joined: 14 Feb 2011, 16:47

22 Jul 2016, 16:29

Hello, how would I go about setting a width/min-width to components in the datagrid?

if I have the following code:

Code: Select all

<div class="Container100 ui-fluid">
  <div class="ContainerIndent">
    <div class="Card ShadowEffect" >
      <p-dataGrid [value]="activities" [columns]="4" >
        <template let-activity>
          <div style="padding:3px">
            <p-panel [style]="{'min-width':'300px'}">
               stuff that fills content............
            </p-panel>
          </div>
        </template>
      </p-dataGrid>
    </div>
  </div>
</div>
The panels don't adjust correctly in the horizontal and overlap each other.

Thanks
Last edited by jp_2011 on 22 Jul 2016, 18:45, edited 1 time in total.
PrimeFaces 5.0, Glassfish 4, Wildfly 8.1, Java 8, Java EE 7
Ubuntu 13.10

jp_2011
Posts: 35
Joined: 14 Feb 2011, 16:47

22 Jul 2016, 18:45

I've discovered that what I have done is correct, however you cannot use hard coded columns. Once I removed the [columns] property, everything works correctly.
PrimeFaces 5.0, Glassfish 4, Wildfly 8.1, Java 8, Java EE 7
Ubuntu 13.10

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests