Hi Travis,
Greetings from Syncfusion support.
We can achieve your requirement using the load, dataBound, rowSelected event of Grid. In the dataBound we can hide the column using the visible property of columns API in Grid.
Refer the below code example.
var flag = false;
window.orderDataSource[0].OrderDate = null;
var grid = new ej.grids.Grid({
dataSource: window.orderDataSource,
allowPaging: true,
selectionSettings: { mode: 'Both' },
height: 500,
load: load,
dataBound: dataBound
});
function load(args){
flag = this.isInitial;
}
function dataBound(args){
if(flag){
this.columns[0].visible = false;
this.refreshColumns();
flag = false;
}
}
grid.appendTo('#Grid');
|
Refer the help documentation.
In the rowSelected event we can get the current selected record in the arguments of those event.
Refer the below code example.
var flag = false;
window.orderDataSource[0].OrderDate = null;
var grid = new ej.grids.Grid({
dataSource: window.orderDataSource,
allowPaging: true,
selectionSettings: { mode: 'Both' },
height: 500,
rowSelected: rowSelected
});
function rowSelected(args){
console.log(args.data);
}
grid.appendTo('#Grid');
|
Refer the help documentation.
We have prepared a simple sample in the following stackblitz link.
Please let us know if you need further assistance on this.
Regards,
Thavasianand S.