This is a migrated thread and some comments may be shown as answers.

Disabled attribute don't work with chrome/mozilla

0 Answers 14 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Helmi
Top achievements
Rank 1
Helmi asked on 03 May 2012, 03:59 PM
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
Tags
General Discussions
Asked by
Helmi
Top achievements
Rank 1
Share this question
or