Custom Commands
You can implement custom commands for handling the records of the TreeList.
To include a command column which will render a button for triggering the command in the column cells:
-
Add a custom command column by using the column definition.
.Columns(columns => { columns.Add().Width(300).Command(c => { c.Custom().Name("details").Text("View Details").Click("showDetails"); }); })
-
Wire the
click
event of the button to a JavaScript function which will receive the corresponding TreeList data item as an argument. In the function definition, handle the command.<script type="text/javascript"> function showDetails(e) { alert("Custom command button clicked!"); } </script>