CFGRID Custom Delete
I am using an example I customised from Dan Vega's Blog on CFGRID. I wanted to add my own delete function to the grid and not using the delete="yes". The function needed to pass the selected ID to a CFC delete function. I decided to use my new found love of cfajaxproxy, what I am not sure about is if I have gone about doing this in the best way. I could not find any examples and my solution does work well, but I cannot help feeling I have gone the long way around this? Without knowing where to look I cannot be sure.
Anyway here is what I did, right or wrong it works.
>Created the CFC (with has my delete function) as a JavaScript object.Setup my grid and buttons, just the delete button in this example.
2function init(){
3 grid = ColdFusion.Grid.getGridObject("ordersSearch");
4 var gridHead = grid.getView().getHeaderPanel(true);
5 var tbar = new Ext.Toolbar(gridHead);
6
7//delete order button
8 tbar.addButton({
9 text:"Delete Order",
10 cls:"x-btn-text-icon",
11 icon:"./images/icons/package_delete.png",
12 handler:onDeleteOrder
13 });
14 console.log(tbar);
15 }





