This question is locked. New answers and comments are not allowed.
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
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