2. I am sending the two files you specified - Logs and Dashboard.xml.
3. To Export without Grid Control - I have developed my own screens, some are RIA queries(mixed more than two tables for reporting purposes) generated and some are plain data from tables that I would like to export by clicking my own button outside ej.control generated data for both browse and view screens.
Again, thank you for your support,
Kind Regards,
Alberto
exp.Export(gridPropert, (IEnumerable)data, "Export.docx");
It does the same on individual record export. I tried the other original example in http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale-1840519435.zip and when exporting I get an error specifying the file cannot be downloaded.
My development environment is win 8.1, vs 2013 ultimate, ctp4 and your upgraded Syncfusion community edition to .30.
It would be great if I could get documentation on how to use exactly your controls or at least that it will allow me to understand the code so that I may know my limitations.
Again, thank you very much for your answers and support
Alberto
Hi Alberto,
Thanks for using Syncfusion Products.
Query 1: “how to translate the toolbar buttons text into Spanish”
We would like to let you know that the “locale” property of Grid helps to set culture to Grid and then by overriding the properties of ej.Grid.localization we can provide the localization strings to toolbar buttons. Please refer the following code snippets.
itemTemplate.ejGrid( { ... locale:"es-ES", } ej.Grid.locale["es-ES"] = { Add: "añadir",
Edit: "editar",
Delete: "Delete",
Update: "borrar",
Cancel: "cancelar",
} |
Also please ensure to refer the globalize.culture.en-ES.min.js script file in your project and follow the below order while referring the scripts.
<link rel='nofollow' href="@Url.Content("~/Content/themes/ej.widgets.core.min.css")" rel="stylesheet" /> <link rel='nofollow' href="@Url.Content("~/Content/themes/ej.theme.min.css")" rel="stylesheet" /> <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.easing-1.3.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jsrender.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/ej.web.all.min.js")" type="text/javascript"></script> |
For your convenience we have created a sample based on your requirement and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale1605979774.zip
Query 2: “some pointers to do the same (Localization) with all controls”
Could you please get back to us with the list of control that you need help with localization so that we can provide you response as early as possible?
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
We would like to let you know that the “locale” property of ReportViewer helps to change the culture of ReportViewer as shown in below code snippet.
ej.ReportViewer.localization["fr-FR"] = { toolbar: { print: { headerText: 'Imprimer', contentText: 'Imprimer.' }, ……. }, viewButton: 'Voir Rapport' }; itemTemplate.ejReportViewer({ processingMode: ej.ReportViewer.ProcessingMode.Local, reportServiceUrl: "../api/SSRSReport", locale: 'fr-FR', reportPath: "date1.rdl" }); |
We have to specify the culture text for all ReportViewer properties such as exportformat, first, previous, next, last, documentMap, parameter, zoomIn, zoomOut, Refresh, printLayout, pageIndex, zoom, back, fittopage and viewButton.
Also please ensure to refer the jquery.globalize.cultures.min.js script file in your project and follow the below order while referring the scripts.
<script type="text/javascript" src="Scripts/jquery.easing.1.3.js"></script> <script type="text/javascript" src="Scripts/jsrender.js"></script> <script src="Scripts/jquery.easing.1.3.min.js" type="text/javascript"></script> <script src="Scripts/jquery.globalize.min.js" type="text/javascript"></script> <script src="Scripts/jquery.globalize.cultures.min.js" type="text/javascript"></script> <script type="text/javascript" src="Scripts/ej/ej.web.all.min.js"></script> <script type="text/javascript"> |
And also we have prepared a sample based on your requirement and same can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/directtrac/general/ReportViewerSample-1711928217.zip
Hi Alberto,
Thanks for the update,
Query 1: “Export toolbar translation for ReportViewer”
We are able to reproduce the issue “Export translation in report viewer toolbar”, however to access this, we request you contact us at Syncfusion Support or you may also create your customer account under Direct Trac and open a new incident so that our support engineer will assist you accordingly.
Our Direct Trac support system can be accessed from the following link:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Also we missed to update the response for some of you queries in previous update due to some network issues and please find the response for those queries below.
Query 3: “put all translation into a class and invoke”
We suggest you to place the localized strings of ej.Grid.locale in a script file and refer it in master page to achieve your requirement.
Query 4: “multi selection (in order to erase one or more records on the grid).”
We considered this requirement “Multiple selection using checkbox” & “Delete Multiple Record in Grid” as feature and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query 5: “way to enable or disable any toolbar buttons & translate Export toolbar in Grid”
We have created a sample based on your requirement and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale_(2)337212828.zip
In the above sample using “enableItem” & “disableItem” properties of Toolbar we have enabled/disabled Grid toolbar buttons. Please refer the following code snippets.
var toolbarButton = $("#Order_toolbarItems").find("li#Order_cancel") //To enable toobar button $("#Order_toolbarItems").ejToolbar("enableItem", toolbarButton); //To disable toobar button $("#Order_toolbarItems").ejToolbar("disableItem", toolbarButton); |
Also please refer the following code snippet to localize Grid Export toolbar button
ej.Grid.locale["es-ES"] = { ... ExcelExport: "Excel exportación", WordExport: "palabra de Exportación", PdfExport: "pdf Exportación", } |
Query 6: “Documentation for Localization”
Please refer the following table.
Control |
Localization |
Grid |
We don’t have UG for localization feature in LightSwitch HTML grid and hence we have created a documentation task. And it will refreshed shortly online. For now, please refer our online JS demo, for using localization in grid. http://js.syncfusion.com/demos/web/#!/azure/grid/Localization |
Autocomplete |
Not applicable |
DatePicker |
http://help.syncfusion.com/ug/lightswitch/default.htm#!documents/localization.htm |
DateTimePicker |
http://help.syncfusion.com/ug/lightswitch/default.htm#!documents/localization1.htm |
Dropdownlist |
Not applicable |
Editors |
http://help.syncfusion.com/ug/lightswitch/default.htm#!documents/localization2.htm |
Progressbar |
Not applicable |
RichTextEditor |
http://help.syncfusion.com/ug/lightswitch/default.htm#!documents/localization3.htm |
Timepicker |
http://help.syncfusion.com/ug/lightswitch/default.htm#!documents/localization4 |
Query 7: “translation of error messages”
We suggest you to extend messages property of jquery validator to define localized strings for validation messages. Please refer the following code snippets.
$.extend($.validator.messages, { required: "Este campo es obligatorio.", number: "Por favor, escribe un número válido.", .. }) |
Alternatively you can refer the jquery localized files available in the following github location.
https://github.com/jzaefferer/jquery-validation/tree/master/src/localization
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Alberto,
We are sorry for the inconvenience caused.
We have modified the sample resolving the reported issue and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale1233245793.zip
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Hi Alberto,
Query 1: “Sample not loadting”
Please find the below link to resolve the issue with loading the sample
Query 2: “duplicates the freight cost while exporting to word”
We were able to reproduce the problem and we considered this requirement “duplicates the freight cost while exporting to word” as bug, also have logged a report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you have any queries.
Hi Alberto,
Thanks for the update.
Query 1: “out of the box View Details screen when a user clicks on a selected browse screen record”
We have achieved your requirement using “rowSelected” Grid event in which we have displayed “View Details” screen and passed selected record data to that screen. Please refer the following code snippets.
itemTemplate.ejGrid( { ... rowSelected: function (args) { ... myapp.showScreen("ViewOrder", null, { beforeShown:function (detailScreen) { var data = args.data; detailScreen.Order = data; }}) }, |
Query 2: “export toolbar on such view details screen to export that single record”
We have added three buttons (Excel Export, Word Export, Pdf Export) in View Detail Screen command bar and those button click event we have mapped export action to the corresponding method in WebApi. Please refer the following code snippets.
myapp.ViewOrder.ExcelExport_Tap_execute = function (screen) { // Write code here. var gridObj = $("#Order").ejGrid("instance") gridObj.exportGrid = gridObj["export"]; gridObj.exportGrid('../api/Orders/ExcelExport_SingleRecord') }; |
And since export POST operation sends only the grid model, we get the selected rows records in the rowSelected event and assign the selected records value to an extra property to access the selected records at the server side. Please refer the following code snippets.
itemTemplate.ejGrid( { ... rowSelected: function (args) { ... this.model.selectedRecords = args.data; }, |
Then at the server side, deserialize the selectedRecords property from the posted grid model as follows.
private GridProperties ConvertGridObject(string gridProperty) { JavaScriptSerializer serializer = new JavaScriptSerializer(); IEnumerable div = (IEnumerable)serializer.Deserialize(gridProperty, typeof(IEnumerable)); ... foreach (KeyValuePair<string, object> ds in div) { var property = gridProp.GetType().GetProperty(ds.Key, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase); if (ds.Key == "selectedRecords") { string serialize = serializer.Serialize(ds.Value); var data = serializer.Deserialize<OrdersView>(serialize); exportData.Add(data);
continue;
} ... } return gridProp; } |
Query 3: “Searching operation in Grid”
Using “allowSearching” property of Grid we can enable searching in Grid and using “toolbarItems” property of toolbarSettings we can add search box in Grid toolbar that can be used to search for the entered value in all columns of Grid. Please refer the following code snippets.
itemTemplate.ejGrid( { ... allowSearching:true, toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Search, ...] }, |
If we misunderstood your requirement or if you want to display the searched records in separate pop up dialog, please get back to us so that we could provide you a response as early as possible.
We have created a sample based on your requirements and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale-1840519435.zip
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Alberto,
Thanks for the update.
Query 1: “need to display the SI or NO values instead of TRUE AND FALSE”
We are glad to let you know that your requirement can be achieved by using “queryCellInfo” grid event in which we have Boolean column cell text according to the boolean value. Please refer the following code snippets.
itemTemplate.ejGrid( { ... queryCellInfo: function (args) { var value = args.text.replace(",", ""); var $element = $(args.cell); switch (args.column.headerText) { case "Verified": if (args.data.Verified) $element.text("SI"); else $element.text("NO"); } } }); |
Sample: http://www.syncfusion.com/downloads/support/directtrac/118007/LightSwitchGridLocale1084924371.zip
Query 2: “On the export option I need to export images to PDF, WORD and EXCEL.”
We considered this requirement “Grid Exporting with template column” as feature and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query 3: “search options by presenting SI or NO question”
We have achieved your requirement using “filteredColumns” property of Grid filterSettings. We have analyzed your screenshot and found that you are searching the Grid content with both Boolean column and ‘Descripcion’ column values and so using “filteredColumns” property of Grid filterSettings we have added filter query (for multiple column filter) to Grid. Please refer the following code snippets.
var customerCol = { field: "CustomerID", operator: "contains", value: $("#custColValue").val(), predicate: "and", matchcase: false } var boolCol = { field: "Verified", operator: "equal", value: $("#boolColCheck").prop("checked"), predicate: "and", matchcase: false } gridObj.model.filterSettings.filteredColumns = []; gridObj.model.filterSettings.filteredColumns.push(customerCol); gridObj.model.filterSettings.filteredColumns.push(boolCol); gridObj.refreshContent(); |
We have included this requirement with the sample provided in response for the query 1. If we misunderstood your requirement, then please get back to us with more information such as the scenario in which you want to open dialog for search options.
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Alberto,
Query 1: “Upgraded to newer version doc”
After upgrading to the latest version please replace the Syncfusion scripts and css in your project with the corresponding one at the following location in your machine.
CSS: ~\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\JavaScript\assets\css\web
Script: ~\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\JavaScript\assets\scripts
Query 2: “search not working for ‘si’ or ‘no’”
We considered this requirement “localization support for Boolean column” as Usability issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query 3: “I don't know where the field comes from, in my system I have it in tables of type Boolean”
In the sample we provided we bound local json data to Grid dataSource which is available in jsondata.min.js script file.
Query 4: “Custom Search Dialog: Buscar Modo”
As per our support guidelines; through forums widely we offer only limited and basic assistance.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query 5: “'Syncfusion.DocIO.Base dll missing while exporting”
We are sorry for the inconvenience caused. We have missed to include the dll “'Syncfusion.DocIO.Base” in the provided sample which is the cause of the issue. We have modified the sample by including the missing dlls and the same can be downloaded from below link.
We would like to let you know that the following dlls will not be shipped with Essential Studio LightSwitch Platform build and so those dlls were not installed in your machine’s GAC location which is causes the issue.
Please refer the above dlls which we provided in sample under “Reference Assemblies” Folder to get your project work.
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Hi Alberto,
Sorry for the inconvenience caused.
In order to install the specified assemblies in the GAC location, please follow the below steps.
i) Download and extract the Assemblies.zip file from the below link.
ii) It contains the two folders namely precompiledassemblies, Utilities
iii) Copy and paste that 2 folders in the below location.
Location: {Drive:}\{Program Files Folder}\Syncfusion\Essential Studio\{Version}\
Example: C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\
iv) Run the “AssemblyManagerWindows” from below mentioned location.
Location: {Drive:}\{Program Files Folder}\Syncfusion\Essential Studio\{Version}\Utilities\Assembly Manager
Example: C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\ Utilities\Assembly Manager
Please refer the following help documentation link to know more about our Assembly Manager Utility.
http://help.syncfusion.com/ug/common/default.htm#!documents/assemblymanager.htm
Now, Assemblies will be installed in GAC location.
Please let me know if you have any queries regarding this.
Regards,
Alan Sangeeth S
Hi Alberto,
We are sorry for the inconvenience caused.
We have analyzed your error message and found that you are using older version dlls 12.4.0.24 which we had provided earlier that is the cause of an issue.
In the previous update, we have provided you latest version 12.4.0.30 dlls under the ‘precompiledassemblies’ in Assemblies.zip file with core dependencies such as “Syncfusion.Core”,etc.,. Once you have run the “AssemblyManagerWindows”, as mentioned in previous update, those dlls will be installed in your GAC location and so please refer the following list of dlls from GAC location or place the dlls, from Assemblies.zip file, in bin folder of your sample and refer dlls from the bin location. Please find the dependency dlls below.
Syncfusion.Core
Syncfusion.Compression.Base
Syncfusion.Linq.Base
Syncfusion.DocIO.Base.dll
Syncfusion.EJ.dll
Syncfusion.EJ.Export.dll
Syncfusion.Pdf.Base.dll
Syncfusion.XlsIO.Base.dll
Note: Please ensure that all the referrrence dlls are latest version 12.4.0.30
For your convenience we have modified the Exporting sample with latest version 12.4.0.30 dlls referred from “Reference Assemblies” folder in the sample and the same can be downloaded from below link.
Please let us know if you have any queries.
Regards,
Alan Sangeeth S
Hi Alberto,
Thanks for the update.
Query 1: “The dashboard tells me that Lightswitch is not installed”
Sorry for the inconvenience caused.
Please check whether the Lightswitch HTML samples are exists in the install location.
Location: {Installed Drive}\{Program files folder}\Syncfusion\Essential Studio\{Installed version}\Samples\
Example: C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\Samples\
If exists in the above location with the samples projects then follow the below steps.
1. Select the 'Recheck' option from corresponding version Dashboard. Please refer the below screen shot for more information.
2. Reopen the Syncfusion Dashboard and now you can find the LightSwitch installed.
If the files not installed in that location then try to reinstall the LightSwitch HTML setup again and ensure LightSwitch in Dashboard.
Please share the below details to us by following the below suggested steps if above steps not resolved this issue.
1. Gather log file.
Follow the steps provided in the below Knowledge base article link to generate the gathered log file.
http://www.syncfusion.com/kb/2331
2. Dashboard.xml file from the install location.
Location: {Installed Drive}\{Program files folder}\Syncfusion\Essential Studio\{Installed version}\Infrastructure\Dashboard\4.0\
Example: C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.30\Infrastructure\Dashboard\4.0\
Quey 2: “To Export without Grid Control”
Could you please clarify us whether your requirement is to export Grid Content using an external button outside Grid or you have not used Grid Control to display Data but need to export some data on a button Click?
Information provided would be great helpful to provide you a response as early as possible.
Regards,
Alan Sangeeth S