0

I have a jqgrid in the which i display some info..

My column name should appear in the same way as below

    Canada          Australia
Month / Year     Month / Year

Tha is how i need to display my columns each column name should display Month/Year below it.

as of now my code looks like

  colnames: [Id,Canada,Australia,Usa]
Hamish
  • 87
  • 1
  • 1
  • 6

1 Answers1

0

It's depend on what you need exactly. The text from colNames items is in general HTML fragment. So you can use <br/> for example:

colNames: ["Id", "Canada<br/>Month / Year", "Australia<br/>Month / Year",
           "Usa<br/>Month / Year"]

To have the height of the column headers increased you could include CSS like

.ui-jqgrid .ui-jqgrid-htable th div { height: auto }

after ui.jqgrid.css.

Alternatively you could want that the text in column header will be wrapped. The case are discussed before in the answer.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798