We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set value tile badge

Thread ID:

Created:

Updated:

Platform:

Replies:

145837 Jul 10,2019 09:16 AM UTC Jul 17,2019 06:58 AM UTC ASP.NET MVC 9
loading
Tags: Tile
Pio Luca Valvona
Asked On July 10, 2019 09:16 AM UTC

Hi,
I used thi code to insert a tile:

@Html.EJ().Tile("tileClienti").ShowRoundedCorner(true).Badge(b => { b.Enabled(true).MaxValue(20).Position(TileBadgePosition.TopRight); }).ImageClass("tileClienti").TileSize(TileSize.Medium).Text(PLV.Web.Resources.Menu.Clienti).ClientSideEvents(c => c.mouseDown("GoClienti").Create("SetBadgeClienti"))



SetBadgeClienti = function (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) {
                        args.model.badge.value = d.value;
                    }
                },
                error: function (e) {
                }
            });
      
    }

I tried to use the "Create" method to set the badge value, but the displayed value is always the minimum value. 
How can I dynamically update this value?


Ashokkumar Balasubramanian [Syncfusion]
Replied On July 10, 2019 01:18 PM UTC

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. 


Pio Luca Valvona
Replied On July 10, 2019 05:01 PM UTC

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. 


Hi Ashokkumar,

thanks for the support, but the indicated change does not work. 
This is the error message: Object doesn't support property or method 'option'.

Ashokkumar Balasubramanian [Syncfusion]
Replied On July 11, 2019 11:46 AM UTC

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. 


Pio Luca Valvona
Replied On July 12, 2019 10:56 AM UTC

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 Ashokkumar,

thanks for the support,
I no longer get the error but the value no updates is always shows the minimum value set.

Ashokkumar Balasubramanian [Syncfusion]
Replied On July 15, 2019 11:36 AM UTC

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 version 
b.     Browser details 
 
Please check the above provided sample and get back to us, if you require any further assistance. 
 
Regards, 
Ashokkumar B. 


Pio Luca Valvona
Replied On July 15, 2019 03:21 PM UTC

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 version 
b.     Browser details 
 
Please check the above provided sample and get back to us, if you require any further assistance. 
 
Regards, 
Ashokkumar B. 


Hi Ashokkumar,

thanks for the support,

I found that the problem is due to the browser, on MS Edge the code does not work, while tried on Google Chrome the value was set correctly.
How do I extend compatibility to Edge?

Package version:17.2450.0.34

Ashokkumar Balasubramanian [Syncfusion]
Replied On July 16, 2019 02:47 PM UTC

Hi Pio Luca Valvona, 
 
We deeply regret for this inconvenience. 
 
As mentioned in your scenario, Tile value updated properly in Edge Browser at our end. Could you please check the below video? 
 
 
We suspect that, you may be the problem on browser cache. Could you please remove the browser cache and ensure the problem at your end? 
 
Please let us know, If still you are not fulfilling the requirement solutions, we will create the new incident for your account and proceed further. 
 
Regards, 
Ashokkumar B. 


Pio Luca Valvona
Replied On July 16, 2019 03:26 PM UTC

Hi Ashokkumar,

thanks for the support,

assuming that I enabled cache clearing every time the browser was closed, I also did this manually but the result is always the same.

Microsoft Edge 44.17763.1.0
Microsoft EdgeHTML 18.17763

Christopher Issac Sunder K [Syncfusion]
Replied On July 17, 2019 06:58 AM UTC

Hi Pio Luca Valvona, 

Thanks for the update. 

We have created a Direct Trac incident under your account to proceed further on this issue. Please log on to our support website to check for further updates 
 
http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac 

Thanks, 
Christo 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon