```
<tbody data-bind="foreach: Items">

        <tr>                            
            <td data-bind="text: Code"></td>
            <td data-bind="text: SubscriptionName"></td>
            <td data-bind="text: Type"></td>
            <td data-bind="dateText: StartDate, dateFormat: 'MM/DD/YYYY'"></td>
            <td data-bind="dateText: ExpirationDate, dateFormat: 'MM/DD/YYYY'"></td>
            <td data-bind="text: IsOneTime"></td>
            <td data-bind="text: ValueDisplayType"></td>
            <td data-bind="text: IsAvailable"></td>                            
            <td>
                <a data-bind="attr: { href: '/couponcode/edit/' + ID() }"><i class="icon-edit"></i> Edit</a> |                                        
                <a data-bind="click: $root.deletedata" href="javascript:void(0)" onclick="return confirm('Are you sure you wish to delete this record?');"><i class="icon-trash"></i> Delete</a>                                
            </td>                            
        </tr>

    </tbody>

    <script type="text/javascript">
    var couponModel = ko.buildAjaxModel("@ConfigManager.Application.BuildApiUrl("couponcode/get/coupons")", CouponModel.Mapping, function () {
                    console.log(couponModel);
                }, function (item) {

                    console.log(item);
                }, true);
    //This is the working of deletion
                couponModel.deletedata = function (model) {                
                    var save = new Framework.AjaxRequestInfo("@ConfigManager.Application.BuildApiUrl("/couponcode/delete/coupon")"+'/' + model.ID(), function () {
                        console.log(save);

                        Framework.Redirector.Redirect("@Url.Action("Index", "Code")");
                    }, function () {
                    });
                    save.setParamData(couponModel);
                    Framework.AjaxManager.remove(save);
                };

                $(function () {
                    Framework.DataBinder.applyBinding(couponModel, "coupon-codes");
                    couponModel.get();
                });
     </script>

//In controller

```