function SetBadgeClienti(args) {
var actionUrl = '@Url.Action("SetBadgeClienti", "Admin")';
$.ajax({
url: actionUrl,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
type: 'POST',
success: function (d) {
if (d.success) {
this.option("badge", { value: 12 });
}
},
error: function (e) {
}
});
} |
Hi Pio Luca Valvona,Greetings from Syncfusion support.We were able to replicate your reported problem at our end. The reported problem due to improperly set our component value on run time. Could you please check the below modified code block?
function SetBadgeClienti(args) {var actionUrl = '@Url.Action("SetBadgeClienti", "Admin")';$.ajax({url: actionUrl,contentType: 'application/json; charset=utf-8',dataType: 'json',type: 'POST',success: function (d) {if (d.success) {this.option("badge", { value: 12 });}},error: function (e) {}});}If you want to dynamically get or set the properties in Syncfusion components, please follow the below help documentation.Please check the above provided code block and get back to us, if you require any further assistance.Regards,Ashokkumar B.
function SetBadgeClienti(args) {
var obj = this;
var actionUrl = '@Url.Action("SetBadgeClienti", "Admin")';
$.ajax({
url: actionUrl,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
type: 'POST',
success: function (d) {
if (d.success) {
obj.option("badge", { value: 12 });
}
},
error: function (e) {
obj.option("badge", { value: 12 });
}
});
} |
Hi Pio Luca Valvona,Thank you for sharing your error details.The reported problem due to access the Tile instance in corresponding code block. So, we have modified our provided code block, please find it below.
function SetBadgeClienti(args) {var obj = this;var actionUrl = '@Url.Action("SetBadgeClienti", "Admin")';$.ajax({url: actionUrl,contentType: 'application/json; charset=utf-8',dataType: 'json',type: 'POST',success: function (d) {if (d.success) {obj.option("badge", { value: 12 });}},error: function (e) {obj.option("badge", { value: 12 });}});}Please check the modified code block and get back to us, if you require any further assistance on this.Regards,Ashokkumar B.
Hi Pio Luca Valvona,We have checked this problem at our end. But our provided code blocks, works properly at our end. Could you please check the below video and sample?Could you please ensure whether you are able to access Tile component instance in create event?Still issue persists, please share the below details.a. Package versionb. Browser detailsPlease check the above provided sample and get back to us, if you require any further assistance.Regards,Ashokkumar B.