Question
TCS
IN
Last activity: 16 Oct 2018 12:03 EDT
How can I get grid header at center?
Hello All,
I want to center the text in header in Grid view.How can i get this using skin?
I am using text-align:center in skin using mixin which is actually working for rows data but not for header(like Color:Amount etc) as seen in image attached below.It is aligned to left.Please help.
Thanks All.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Blue Rose Technologies GmbH
BE
Hi Umesh,
Can you try padding-left style for column header to be in middle.
I tried and use padding-left and it worked fine for me.
Please try and let me know.
Thanks.
TCS
IN
Thanks Akshay. It is working in design time but not in rum time for me.
Pegasystems Inc.
IN
Hi
It should ideally be consistent . Can you use the chrome debugger tool to see whether any other styling component is overriding this or not.
Also it is a good idea to use !important to force browser to pick this style only at runtime.
Please share your view on this.
Pegasystems Inc.
US
HI UMESHK29,
I followed your use case and created an example on my Pega 7.2.1 system.
I modified OOTB section "pxUIGalleryBasicGrid" Grid Repeat Layout 2 and added an title "This is a test" in the "Action Top". (make the width of the title field is the same as the width of the repeating grid table). In the Label configuration "Cell inline style", I entered "text-align:center". see attached screenshot 1.
During the run time (launch Grid example below), I can see the title is displayed in the center. see attached screenshot 2.
Designer Studio -> User Interface -> UI Gallery -> Grid example.
Thanks,
Susan
TCS
IN
Thanks Susan for your help.You solution will work but we should not use inline-style in section as per Pega guardrail,it throws warning .Also I am looking for reusability so that i define once in the skin and use it everywhere when required.
Pegasystems Inc.
IN
hello,
You can make the change by doing the below configuration:
- Uncheck the Align column heading with column data
- Make the Align column header as center.
Screenshot:
Hope this helps.
Best Regards,
Mounika
TCS
IN
Thanks Mounika but if i opt your solution then in every label i have to do this change which is not best practice so we need to define style at central place like skin so that it can be used everywhere..
TCS
IN
Hi All,
I still waiting for the desired solution.Any new idea guys?
Boston Consulting Group
US
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.