Skip to content

CGridColumnGroup

Defines multiple header.
Can be used in the default slot of CGrid.

Vue Template Structure

vue
<template>
  <div class="demo-grid middle">
    <c-grid :data="records" :frozen-col-count="1">
      <c-grid-column field="personid" width="85">ID</c-grid-column>
      <!-- multiple header -->
      <c-grid-column-group caption="Name">
        <c-grid-input-column field="fname" width="20%" min-width="150">
          First Name
        </c-grid-input-column>
        <c-grid-input-column field="lname" width="20%" min-width="150">
          Last Name
        </c-grid-input-column>
      </c-grid-column-group>
    </c-grid>
  </div>
</template>
<script>
export default {
  data() {
    return {
      records,
    };
  },
};
</script>

Slots

default slot

Use this slot to set the children columns definition

Properties

Optional Properties

NameTypeDescriptionDefault
captionstring|functionDefines a header caption''
header-actionobject|string|functionDefines a column header action. Same as the headerAction property of the JS API.undefined
header-fieldstringDefines a column header data fieldundefined
header-iconobject|stringDefines a header iconundefined
header-styleobject|string|functionDefines a column header style. Same as the headerStyle property of the JS APIundefined
header-typeobject|string|functionDefines a column header type. Same as the headerStyle property of the JS APIundefined
sortboolean|string|functionDefines a sort. See "Sort by Column" for detail.undefined

Methods

NameReturn TypeDescription
invalidate---Redraws the whole grid.