Using HeaderText and column type of Checkbox

When using both the HeaderText and column type of Checkbox the grid header show a checkbox instead of the header.


                    <GridColumns>
                        <GridColumn Field=@nameof(GroupDto.GroupId) IsPrimaryKey="true" Visible="false" />
                        <GridColumn Field=@nameof(GroupDto.Name) HeaderText="Name" ValidationRules="@(new { required=true})" Width="50"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.Members) HeaderText="Members" Width="25"></GridColumn>
                        @*<GridColumn Field="@GridData[0].Leaders[0].Leader.FullName" HeaderText="Leader width="25"></GridColumn>*@
                        <GridColumn Field=@nameof(GroupDto.Created) HeaderText="Created" ValidationRules="@(new { required=true})" Format="d" Type="ColumnType.Date" Width="50"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.IsArchived) HeaderText="Archived" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.AllowIndividualRequests) HeaderText="Individual Request"  Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.AllowSelfEnrollment) HeaderText="Self Enrollment" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.AllowLeadersToViewMembers) HeaderText="Leaders View" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.AllowIndividualsToKnow) HeaderText="Individuals View" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.AllowMembersToViewMembers) HeaderText="Members View"  Type="ColumnType.CheckBox" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.TrackMeetingAttendance) HeaderText="Attendance" Type="ColumnType.CheckBox" Width="25"></GridColumn>
                        <GridColumn Field=@nameof(GroupDto.ShowCheckin) Type="ColumnType.CheckBox" Width="25"></GridColumn>
                    </GridColumns>




1 Reply 1 reply marked as answer

KM Kuralarasan Muthusamy Syncfusion Team July 6, 2020 06:50 AM UTC

Hi Mike, 

Thanks for contacting Syncfusion support. 

From your query, we suspect that you need to show checkbox for the Boolean column. So, we suggest you to enable the “DisplayAsCheckBox” property (like as below code snippet) instead of providing the column type as checkbox. In this case, you can show provided header text in header. 

<GridColumn Field=@nameof(OrderDetails.Verified) HeaderText="Vefified" DisplayAsCheckBox="true" Width="120"></GridColumn> 

We have already discussed about this topic in below documentation. Please refer this for more details. 


Please get back to us with your exact requirement details, If we misunderstood your query or if you need any further assistance on this. 

Regards, 
Kuralarasan M 


Marked as answer
Loader.
Up arrow icon