Solved

List view column header font size and other style settings not rendering in form.

  • 11 December 2017
  • 9 replies
  • 121 views

  • Anonymous
  • 0 replies

I have specified a font size for a list view column header and it renders correctly in the list view designer but it does not render correclty in the smartform that it has been added to. I tried changing the color of the columun header too but not success with that either.

 

I am looking for a solution.  Any ideas?

 

Thanks,

alv4

icon

Best answer by Kran 13 December 2017, 21:07

View original

9 replies

Badge +7
Hi,

Have you done these changes on the css sheets? Or else you have them defined particularly from the designer?

Thanks,

In the desginer only.

 

Badge +9

Hi Alv4,

 

 

I have assumed that In list view header you have taken class name  as CSS selector, when accessing a view directly (wihout forms) the class name will be having initial  text   like 00000*personal details removed*000  but when we access same view using form it will be replaced by Form ID, thus if you are using full class name which you might have taken from view  will not work with forms.

 

Refer attached screen to see diffrence in class name while accessing it directly and using  Froms.

 

 

to make it work correctly you with both form as well as direclly you have two ways

1) use both classes i.e. from  Forms as well as view as selector  for Css property

 

2) Use wildcard selector

 

div[class^="grid-column-header-text"] { color:red;}

 

Let me know if this helps you.


Hi Kran,

 

I do not know how to edit the stylesheet. I am using the view designer interface.

Can you further explain?

 

Thank you for helping.

 

Badge +9

Hi Alv4,

 

    Refer below link to get an idea on developer tool to findout CSS selector

 

How to use Web Page Inspector to get CSS or jQuery selector in Smartforms

 

 Once you have created style refer below steps

 

Drag and drop Data Label on top of listview and do the below changes under property (appears on R.H.S.)

  • Check the Literal property option
  • For Expression property add below style using start and closing style tag.

 

<style>
div[class^=”grid-column-header-text”]{
padding: 5px;
font-size: 11px;
font-weight: bold;
}
</style>

Kran,

 

I have followed you instructions but I must be missing something.

There is not an exprssion option for the Header so I added it in the expression option for the Body tab.

Also, I checked Literal checkboxes in Header and Body tabs.

 

Is there something else? Truly appreicated.

 

alv4

Badge +9

Hi alv4,

 

To add custom style you are required to use Datalabel control, for this control do the below changes under property (appears on R.H.S.)

  • Check the Literal property option
  • For Expression property add below style using start and closing style tag.

pls refer this video   K2 Smartforms Custom styling using internal CSS

Hi Kran,

 

Yes this worked! Perfectly!

 

Thank you.

alv4

Userlevel 1
Badge +8

Hi All


 


Does anyone possible have a package of a small solution of this ?


 


Regards


Heinrich

Reply