jQWidgets Forums
Forum Replies Created
-
Author
-
December 1, 2017 at 8:21 am in reply to: create a widget column in angular 4 jqxGrid create a widget column in angular 4 jqxGrid #97661
Hi Ivo,
kindly note that your code did not fix the problem.
that’s the code of the column i created{
text: ”, datafield: ‘btn_account_search’, width: 20, editable: false,
createwidget: (row: any, column: any, value: string, htmlElement: HTMLElement): void => {const container = document.createElement(‘div’);
const id = ‘btnAccountSearch_’ + row.bounddata.id;
container.id = id;
container.style.border = ‘none’;
htmlElement.appendChild(container);const options = {
value: “<span><i class=’material-icons’>search</i></span>”,
width: ‘100%’, height: ‘100%’
};const myButton = jqwidgets.createInstance(‘#’ + id, ‘jqxButton’, options);
myButton.addEventHandler(‘click’, (): void => {
this.ShowAccountNoSearchPopup(row.bounddata.id, row.bounddata.account_no);
});
},
initwidget: (row: number, column: any, value: any, htmlElement: HTMLElement): void => { }
},“ShowAccountNoSearchPopup” is a typescript function that should receive 2 parameters from the row data
mainly the grid shows 14 rows with scrollbar
if i press a button contained in any of the first 14 rows the data send to the function is the correct data of the row i selected
but if i scroll down to row 30 for example and press the button of this row the data send to the function is not the data of this row but the data of one of the 14 rows initially shown in the grid.Best Regards.
-
AuthorPosts