BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
I using a Hierarchy Grid.
What I'm trying to accomplish is that if a row doesn't have children, then I don't want the empty row to show (or not have the row to expand).
See image below:
I would prefer not to display the expand/collapse icon if possible.
I was calling the DetailsExpand event on the grid and trying to cancel it, but the event never cancels.
function grid_DetailsExpand(e) {
e.cancel = true;
}
Eric
<body>
<div class="content-container-fluid">
<div class="row">
<div class="cols-sample-area">
<div id="Grid"></div>
</div>
</div>
</div>
<script type="text/javascript">
var Data = [
{ EmployeeID: 0, FirstName: 'VINET', Title: 'SalesRepresentative', Country: 'USA' },
{ EmployeeID: 1, FirstName: 'HANAR', Title: 'SalesRepresentative', Country: 'USA' },
. . .
];
$(function () {
$("#Grid").ejGrid({
dataSource: Data,
rowDataBound: "rowdatabound",
allowSorting: true,
columns: [
{ field: "EmployeeID", headerText: 'Employee ID', textAlign: ej.TextAlign.Right, width: 75 },
{ field: "FirstName", headerText: 'First Name', textAlign: ej.TextAlign.Left, width: 100 },
],
childGrid: {
dataSource: window.gridData,
queryString: "EmployeeID",
},
});
});
function rowdatabound(args) {
var filter = args.rowData.EmployeeID;
var data = ej.DataManager(window.gridData).executeLocal(ej.Query().where("EmployeeID", "equal", parseInt(filter), true));
if (data.length == 0) {
args.row.find(".e-icon").addClass("e-hide");
}
}
</script>
</body>
|