Grid show 0 numeric value

Hi,
I use syncfusion ej2 asp.net core grid component:
[...]
     <e-grid-column field="Limit" headerText="Limit" textAlign="Right" width="150" type="number"></e-grid-column>
[...]

If Limit is 0, its value is not shown. Only values different from 0 are shown.
How can I show 0 as value on the grid?

Thanks

7 Replies

VA Venkatesh Ayothi Raman Syncfusion Team June 18, 2018 12:57 PM UTC

Hi Mini Dev, 


Thanks for using Syncfusion products. 

We have tried to reproduce the reported issue at our end but its unsuccessful. We have prepared a sample for your convenience which can be download from following link, 



Code example
<e-grid-columns> 
 
            . .  . 
            <e-grid-column field="EmployeeID" type="number" headerText="Employee " textAlign="Right" width="120"></e-grid-column> 
            . .   . 
 
        </e-grid-columns> 

Output

 

If you still face the same issue, then could you please provide following details? 

1)      Please share the full Grid code example. 
2)      Share issue screenshot or video. 
3)      Share the any one of the row record data which is bounded in your data source as well as corresponding field has 0 value. 
4)      Scenario to reproduce the issue. 
 


Regards, 
Venkatesh Ayothiraman. 



MD Mini Dev June 19, 2018 02:24 PM UTC

Hi,
I'll give you more information by attachments.

Limit is decimal property type.

Thanks

Attachment: Images_988bb658.zip


RS Renjith Singh Rajendran Syncfusion Team June 20, 2018 01:36 PM UTC

Hi Mini Dev, 

We have analyzed the screenshots you have shared with us. We suspect that you are facing problem with binding of data from server to client side. We suggest you to ensure whether you are getting data in the currentViewData of Grid or network tab on the developer tools. Please refer the screenshot below and ensure this in your sample and share the screenshot of your currentViewData.  

 

If you still face the same issue, please share with us the data type you are using for the “Limit” field at server side and the complete data you are using to bind data to the Grid. 

Regards, 
Renjith Singh Rajendran. 



MD Mini Dev June 21, 2018 10:09 AM UTC

Hi, 
if I debug my ViewBag.dataSource server-side I have my public decimal limit set to 0.00.
Besides if I debug using console developer tool I don't have limit property in currentViewBag.
See attachments for more info.

Thanks

Attachment: Debug_8986b1d4.zip


RS Renjith Singh Rajendran Syncfusion Team June 22, 2018 01:33 PM UTC

Hi Mini Dev, 

We have analyzed the screenshots. We suspect that the cause of the issue is that the ‘Limit’ does not have a nullable decimal type. This is why this is not returning null values to display in Grid. We suggest you to set nullable decimal type for the ‘Limit’ property to overcome the problem you are facing. Please refer the screenshot below, 

[HomeController.cs] 
 
 
Please refer the general documentation links below, 
 
Please download the sample from the link below, 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



MD Mini Dev June 22, 2018 01:58 PM UTC

Hi,
yes, now it works. I set Limit as nullable type.

Thanks for helping me.




RS Renjith Singh Rajendran Syncfusion Team June 25, 2018 04:12 AM UTC

Hi Mini Dev, 

Thanks for the update. 

We are happy to hear that your requirement has been achieved.  

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Up arrow icon