Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

How can i make select row and selectall using with checkbox? #163

Closed
@scharf110

Description

@scharf110

Hi! I want to create selectall column using with checkbox. But i'm not handle selectrow data. How can i do?

$scope.dtOptions = DTOptionsBuilder.newOptions()
                   .withOption("ajax", {
                       url: "api/ListApiController/GetList",
                       type: "POST"
                   })
                   .withDataProp("data")
                });

$scope.dtColumns = [
                DTColumnBuilder.newColumn("Selected")
                    .withTitle("<input type='checkbox' class='group-checkable' data-set='.checkboxes' />")
                    .notSortable().withOption("searchable", false)
                    .renderWith(function (data) {
                        if (data) {
                            return "<input type='checkbox' checked='checked' class='checkboxes' name='Id' value='" + data + "'/>";
                        } else {
                            return "<input type='checkbox' class='checkboxes' name='Id' value='" + data + "'/>";
                        }
                    }).withClass("text-center"),
                DTColumnBuilder.newColumn("Column2").notSortable().withTitle("Column2"),

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions