Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Disabled attribute don't work with chrome/mozilla

Not answered Disabled attribute don't work with chrome/mozilla

Feed from this thread
  • Helmi avatar

    Posted on May 3, 2012 (permalink)

    Hello every One,
    i'm  using telerik mvc.I create a custom command button .
     columns.Command(commands =>
                            {
                                commands.Edit();
                                commands.Custom("ValidApproved")
                                            .Text("Approve Customer")
                                           // .Action("ApprovedCustomer", "CustomerGrid")
                                            .DataRouteValues(route => route.Add(o => o.DunsCustomerId).RouteKey("id"))
                                            .HtmlAttributes(new Dictionary<string, object> { { "class", "button-state" } });

     
                            });
    After that i create the javascript function
     function customer_OnRowDataBound(e) {
            var grid = $(this).data('tGrid');
            EnableApproved(e);
        }
     function EnableApproved(e) {
            var d = e.dataItem;
            if (d != null) {
                if (d["CustomerStatus"] == 1) {
                    $(e.row).find('a.button-state').attr('disabled', 'true');
                }
            }
        }
    The problem is that disabled attribute is not supported by chrome and mozilla even when i replace attr with prop or true with disabled and it work with IE
    Can you help me please.
    Best regards,
    Helmi

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Disabled attribute don't work with chrome/mozilla