Hi,
I want to show user image with name. I'm getting user image from the backend, so please help me how to display user image. Thanks in advance.
Hi,
You could achieve it using a renderer
function
Also, you need to set htmlEncode
to false
{
text : 'Name',
field : 'name',
flex : 2,
editor : {
type : 'textfield',
required : true
},
htmlEncode : false,
renderer(props) {
const { name } = props.record;
const link = 'image-link';
return `
<div style="display: flex">
<img src="${link}" width="50" height="50" />
<p style="margin-left : 20px">${name}</p>
</div>
`;
}
}
https://bryntum.com/products/grid/docs/api/Grid/column/Column#config-htmlEncode
https://bryntum.com/products/grid/docs/api/Grid/column/Column#config-renderer