Hi all,
I start play with this powerfull enviroment to Before-buy try.
I try customize TUniDBGrid a bit for my needs. I did found some piece of code to add button in line with refresh and paginal buttons on DBGrid footer.
I use this code in TabulkaKaret:TUniDBGrid.ClickEvents.UniEvents.Ext.toolbar.Paging[pagingBar].afterCreate
function pagingBar.afterCreate(sender)
{
sender.add([
{
xtype: 'button',
icon: 'files/images/navigate_plus.png',
tooltip: 'Přidej řádek',
handler: function() {
ajaxRequest(
MainForm.DetailUctuFrame,'addRow',
["slctd="+MainForm.DetailUctuFrame.TabulkaKaret.getSelectionModel().getCount()]
);
}
},
{
xtype: 'button',
icon: 'files/images/navigate_edit.png',
tooltip: 'Oprav řádek',
handler: function() {
ajaxRequest(
DetailUctuFrame.window,'edRow',
["slctd="+TabulkaKaret.getSelectionModel().getCount()]
);
}
},
{
xtype: 'button',
icon: 'files/images/navigate_minus.png',
tooltip: 'Zruš aktuální řádek',
handler: function() {
ajaxRequest(MainForm.window, 'delRow',
["slctd="+DetailUctuFrame.TabulkaKaret.getSelectionModel().getCount()]);
}
}
]);
The creating is working fine, I have 3 new buttons on position where I exactly want to have it.
The problem is, that I'm not to able catch click on those buttons. I have main form called MainForm:TMainForm.. The TabulkaKaret.TUniDBGrid is situated on DetailUctuFrame:TDetailUctuFrame.
My ajaxRequests are bad, but I don't know, how to write a correct syntax. Could you help me, please.
Best regards
Petr