Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144552 | May 11,2019 10:59 AM UTC | May 16,2019 09:41 AM UTC | Angular - EJ 2 | 7 |
![]() |
Tags: Grid |
@Component({
selector: 'app-root',
template: '<button (click)="click($event)">Read records</button>
<ejs-grid #grid [dataSource]='data' allowPaging='true' height=365 [pageSettings]='initialPage'>
<e-columns>
. . .
</e-columns>
</ejs-grid>
'
})
export class AppComponent {
@ViewChild('grid')
public grid: GridComponent;
ngOnInit(): void {
this.data = data;
this.initialPage = { pageSizes: true, pageCount: 4 };
}
click(e){
console.log(this.grid.pageSettings.currentPage);
console.log(this.grid.currentViewData); // here you can store the records in your model
}
} |
string base64String = Convert.ToBase64String(bytes, 0, bytes.Length); // Convert the bytes to base64 string
|
function queryCellInfo(args) { // Grid queyCellInfo event
if (args.column.field == "Image") {
var image = new Image();
image.src = "data:image/png;base64," + args.data.Image; // base64 string
args.cell.appendChild(image); // Appended the image to particular cell
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.