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. Image for the cookie policy date
close icon

Globalization and format problem

Hi,

we are having problems with the globalization in asp.net grid control
The project is asp.net (not syncfusion) so we manually added dependencies.

The format of numbers and currencies is not changed in the columns but stays in english.
We need it to be 1.123,00

In the attachment is the (hopefully) relevant info.
I have read the 
https://www.syncfusion.com/kb/4008/how-to-enable-localization-in-grid
http://help.syncfusion.com/aspnet/grid/localization

and tried numerous things. Nothing helped.
Also the datetime (from the SQL database table) column would not format at all.
Just stays in this format: 2015-03-25T00:00:00.000Z

Thank you in advance.

Attachment: syncfusion_bdbd80a4.7z

10 Replies

SE Semper June 7, 2016 07:24 AM UTC

Forgot to mention that there are columns defined in the grid (main.aspx)
Just removed some of them
  <Columns>
<ej:Column Field="Brutto" HeaderText="Brutto" HeaderTextAlign="Center" TextAlign="Right" Width="100" EditType="Numeric" Format="{0:N2}" />
<ej:Column Field="Netto" HeaderText="Netto" HeaderTextAlign="Center" TextAlign="Right" Width="100" Format="{0:N2}" />
<ej:Column Field="Pocetak" Format="{0:dd.Mm.yyyy}" HeaderText="Početak " HeaderTextAlign="Center" TextAlign="Center" Width="200" />
</Columns>         




PK Prasanna Kumar Viswanathan Syncfusion Team June 8, 2016 01:30 PM UTC

Hi Semper, 

Thank you for contacting Syncfusion support. 

We checked the attached screenshot and we created a sample according to your code example. In this sample we can render the grid and the mentioned format has been applied to the date and freight column. 

Find the screenshot: 

 

In your attached files we found that you have referred the ej.culture.hr-HR.js and jquery.globalize.js file in Main.aspx page and bundle.config vb also. So, we suggest you to remove the reference from the Main.aspx page. 

For your convenience we attached the sample, please try the attached sample and still you face the same issue please reproduce the issue in the attached sample. 


Regards, 
Prasanna Kumar N.S.V 



SE Semper June 9, 2016 06:39 AM UTC

Thank you for the reply.

I have removed the reference from Main.aspx but with no luck.

When i try to debug/run your sample i get the following parser error

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: The base class includes the field 'Grid', but its type (Syncfusion.JavaScript.Web.Grid) is not compatible with the type of control (Syncfusion.JavaScript.Web.Grid).

Source Error: 

Line 2:  
Line 3:  <asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
Line 4:      <ej:Grid ID="Grid" runat="server" AllowPaging="True" AllowSorting="True" EnableHeaderHover="True" Locale="hr-HR">
Line 5:              <Columns>
Line 6:                 <ej:Column Field="Freight" HeaderText="Netto" HeaderTextAlign="Center" TextAlign="Right" Width="100" Format="{0:N2}" />

Source File: /default.aspx    Line: 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1



Thank you for your further help.





PK Prasanna Kumar Viswanathan Syncfusion Team June 10, 2016 07:08 AM UTC

Hi Semper, 

Query : “The base class includes the field 'Grid', but its type (Syncfusion.JavaScript.Web.Grid) is not compatible with the type of control (Syncfusion.JavaScript.Web.Grid).” 

We suspect that the mentioned issue is occur due to DLL Conflict. To avoid this issue, Please make sure the following things before build your application. 
 
1)  Syncfusion dependent assemblies must be of the same version in the web.config file according to the project application framework. When the project application has reference to the Syncfusion DLL’s Syncfusion.EJ and Syncfusion.EJ.WEB and when those DLLs are mentioned with different versions as given in the following code example, then the DLL conflict arises.   
  
 
<assemblies> 
        <add assembly="Syncfusion.EJ.Web, Version=14.1400.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> 
        <add assembly="Syncfusion.EJ, Version=14.1400.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> 
      </assemblies> 

So, please ensure that Syncfusion.EJ and Syncfusion.EJ.WEB versions in the web.config file are the same as the DLLs in the Reference 
 
Regards, 
Prasanna Kumar N.S.V 



SE Semper June 10, 2016 10:53 AM UTC


Thank you.

I have changed the version in web.config and managed to start the sample.
It does show the columns formatting as we desire.

In the meantime, i created a new ASP syncfusion project and moved the code from our original asp.net project

But i still don't get the columns formatting as hr-HR. I tried numerous things.
Also, in the attachment, on grid paging the arrow signs are not visible for some reason.

Is there a way to send you our entire project (50MB) so you could help?

Attachment: ss_e1c894e6.7z


PK Prasanna Kumar Viswanathan Syncfusion Team June 13, 2016 06:30 AM UTC

Hi Semper, 

Thanks for the reply. 

              Queries 
                                Response 

on grid paging the arrow signs are not visible for some reason” 


We suspect that you have missed to include the common-images folder in your application. While installing the Essential Studio, we will include all the common font icons and other images required for the control to render in the common-images folder.   

Location : C:\ InstalledLocation\ Syncfusion\Essential Studio\xx.x.x.xx \JavaScript\assets\css\web\ 
 
So, please include the mentioned folder in the below structure.   

Find the Screenshot: 

 


Is there a way to send you our entire project (50MB) so you could help?” 


While attaching your project delete the bin, obj and packages folder it will reduce the size of the file or attach your sample in Github or Google drive  


Regards, 
Prasanna Kumar N.S.V 



SE Semper June 13, 2016 11:45 AM UTC

Here is the project.

I hope you can help.
I had no luck.
The cultural globalization, missing common images and export to excel are the issue.

The excel issue:

Protected Sub FlatGrid_ServerExcelExporting(sender As Object, e As Syncfusion.JavaScript.Web.GridEventArgs)
        Dim exp As New ExcelExport()

        exp.Export(Grid1.Model, DirectCast(Grid1.DataSource, IEnumerable), "Export.xlsx", ExcelVersion.Excel2010, True, True, "flat-lime")
    End Sub

Severity Code Description Project File Line Suppression State
Error BC30519 Overload resolution failed because no accessible 'Export' can be called without a narrowing conversion:
    'Public Overloads Sub Export(gridmaodel As GridProperties, datasource As Object, excelname As String, excelversion As ExcelVersion, isHideColumnIncude As Boolean, isTemplateColumnIclude As Boolean, theme As String)': Argument matching parameter 'excelversion' narrows from 'ExcelVersion' to 'ExcelVersion'.
    'Public Overloads Sub Export(gridmaodel As GridProperties, datasource As Object, excelname As String, excelversion As ExcelVersion, isHideColumnIncude As Boolean, isTemplateColumnIclude As Boolean, theme As ExportTheme)': Argument matching parameter 'excelversion' narrows from 'ExcelVersion' to 'ExcelVersion'.
    'Public Overloads Sub Export(gridmaodel As GridProperties, datasource As Object, excelname As String, excelversion As ExcelVersion, isHideColumnIncude As Boolean, isTemplateColumnIclude As Boolean, theme As ExportTheme)': Argument matching parameter 'theme' narrows from 'String' to 'ExportTheme'.

All in default.aspx

Thank you.

Attachment: Project_287d1366.7z


PK Prasanna Kumar Viswanathan Syncfusion Team June 14, 2016 02:33 PM UTC

Hi Semper, 

           Queries 
                            Response 

“Cultural Globalization” 

In the attached sample, you have not mentioned the columns in the aspx page. So, mention the columns and format which has to be applied to the column.   
  
For your convenience, we attached the modified sample 
    

“common - images” 

In your sample, you have set EnableOptimizations as true in the Global.aspx page. If you set as true, apply the CssRewriteUrlTransformation in the bundle config or disable the EnableOptimization in the Global.aspx page   
   
Find the code example:   
 
bundles.Add(New StyleBundle("~/bundles/Styles") 
               .Include("~/Content/ej/ej.widgets.core.min.css"New CssRewriteUrlTransform())  
                    .Include("~/Content/ej/web//Default-theme/ej.theme.min.css"New CssRewriteUrlTransform())); 
 
 
In other way if you need to refer “ej.widgets.all.min.css” file, then it add as a separate bundle and by applying a CssRewriteUrlTransformation in it . Please refer to the following code example. 
 
 
bundles.Add(New StyleBundle("~/bundles/Styles").Include( 
             "~/Content/bootstrap.min.css", 
             "~/Content/Site.css", 
             "~/_COMMON/Styles/grawe.css" 
            )) 
        bundles.Add(New StyleBundle("~/bundles/Styles").Include( 
          "~/Content/ej/default-theme/ej.widgets.all.min.css", New CssRewriteUrlTransform())) 
 
 


export to excel 


In the sample, you have used the Syncfusion.EJ.ReportViewer namespace for the Excel version. So, use Syncfusion.XlsIO for the excel version.   
 
Find the code example: 
 

Imports Syncfusion.EJ.Export 
Imports Syncfusion.XlsIO 
 
 
----------------    End Sub 




Regards, 
Prasanna Kumar N.S.V 
 



SE Semper June 15, 2016 01:16 PM UTC


Thank you. 
Everything works now except the Cultural Globalization.
I forgot to mention the columns in the project i sent you, but with the columns it still doesn't work
 <Columns>
<ej:Column Field="Brutto" HeaderText="Brutto" HeaderTextAlign="Center" TextAlign="Right" Width="100" EditType="Numeric" Format="{0:C2}" />
            <ej:Column Field="Netto" HeaderText="Netto" HeaderTextAlign="Center" TextAlign="Right" Width="100" Format="{0:C2}" />
            <ej:Column Field="Pocetak" Format="{0:dd.MM.yyyy}" HeaderText="Početak" HeaderTextAlign="Center" TextAlign="Center" Width="100"  />
 </Columns>




PK Prasanna Kumar Viswanathan Syncfusion Team June 16, 2016 09:04 AM UTC

Hi Semper, 

We checked with the columns in your project and cultural Globalization is working fine in the sample. In your sample you have used SQL connection to render the grid. So, we checked with SQL Connection and we are unable to reproduce the mentioned issue at our end. 

We have attached a video and which can be downloaded from the following link   


If you still face the same issue, please reproduce the issue in the attached sample to validate the issue.  


Note: Before run the sample clear the browser cache. 

Regards, 
Prasanna Kumar N.S.V 
 


Loader.
Live Chat Icon For mobile
Up arrow icon