-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, Is there any possible way to merge grid header without using <auxheader> ? because I use only 1 row header. Please help. Thanks in advance.
<grid
id="gridData"
emptyMessage="No records exist"
model="@bind(vm.attendances)">
<columns sizable="true">
<column label="No."/>
<column label="Student Id"/>
<column label="Student Name"/>
<column label="Emergency Contact"/>
*** I want to merge these 2 headers below into 1 header (Emergency Contact)
<column label="Contact Note" width="100px"/>
<column label="Phone" width="135px"/>
</columns>
<template name="model">
<row>
<label value="@bind(forEachStatus.index)"/>
<label value="@bind(each.studentId)"/>
<label value="@bind(each.studentName)"/>
<label value="@bind(each.contactNote)"/>
<label value="@bind(each.phone)"/>
</row>
</template>
</grid>
I don't fully understand your requirements. Could you post an image to show it?
As my current understanding, I suppose you can replace 2 <column>
with 1 <column>
like:
<columns sizable="true">
<column label="No."/>
<column label="Student Id"/>
<column label="Student Name"/>
<column label="Emergency Contact"/>
<column label="Merged Column" width="100px"/>
</columns>
Or do you want to make 2 labels inside 1 column like?
<row>
<label value="@bind(forEachStatus.index)"/>
<label value="@bind(each.studentId)"/>
<label value="@bind(each.studentName)"/>
<cell>
<label value="@bind(each.contactNote)"/>
<label value="@bind(each.phone)"/>
</cell>
</row>
Or check cell "colspan" attribute.
Asked: 2023-09-20 15:40:54 +0800
Seen: 9 times
Last updated: Sep 22