Kendo Export to Excel is not working in IE - angularjs

I am tryng to export current grid data to excel it is working good in chrome but its not working for IE.How i can acheive this task and make it work in IE ? Any suggetion or help will be appreciated.
gridConfig.JS
toolbar: [
{
template: kendo.template('<a href="" class=\'k-button k-button-icontext k-grid-add\' ng-click=\'addNewRole();\'><span class=\'k-icon k-add\'></span>Add Entity</a>')
},
"excel"
], excel: {
fileName: "Subcategory Export.xlsx",
// proxyURL: "http://demos.telerik.com/kendo-ui/service/export",
filterable: true
},

got it working its more like backend work we created one end point where we can post the grid data with base-64 and backend is sending an attachment

Related

Set default team view filter selection on page load in Twilio flex UI - Reactjs

In the team view filters of Twilio flex UI, I want to set the filter selection dynamically. I need to pass an array or object on dynamically to set the filters selection and the results need to be displayed accordingly based on the new filter selection. Any idea on how to achieve it? Thank you.
Use this
let defaultTwilioAgentList = [
{
query: 'data.activity_name == "Available" OR data.activity_name == "Idle"',
text: "Active Agents"
},
{
query: '',
text: "All Agents"
},
];
Flex.AgentsDataTable.defaultProps.filters = departmentList;
This works for me at Flex version 1.21.1

Equation box in Quill is not completely visible

enter image description here
Trying to use Quill in my project. I'm using Bootstrap class 'row' with two columns. Right hand side column has Quill, everything works fine except this equation box (see in the image). Can anybody help?
I solved this using bounds. Here is the code snippet:
let quill = new Quill('#editor-container', {
modules: {
formula: true,
syntax: true,
toolbar: '#toolbarOptions'
},
placeholder: 'Compose your question here...',
theme: 'snow',
bounds: '#editor-container'
});

How to format Quill text as HTML outside of the editor?

I have a form which posts the contents of the Quill editor to a PHP script. The PHP script then saves the text to a database. This same text can be loaded into the Quill editor at a later date. This all works fine and displays as expected.
FYI the code I am using is below:
<input name="editor1" type="hidden">
<div id="editor-container"></div>
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
<script>
var quill = new Quill('#editor-container', {
modules: {
toolbar: [
['bold', 'italic', 'underline'],
[{ list: 'ordered' }, { list: 'bullet' }]
]
},
theme: 'snow'
});
var form = document.querySelector('form');
form.onsubmit = function() {
var description = document.querySelector('input[name=editor1]');
description.value = JSON.stringify(quill.getContents());
return true;
};
<?php
if (isset($description)) {
?>
quill.setContents(<?=$description?>);
<?php
}
?>
</script>
The problem is this:
I don't want to have to load the Quill editor every time I want to display text which was generated using the Quill editor. I'd like to be able to display this text on a normal webpage, formatted using HTML.
For example, if someone typed the following into the Quill editor:
hello
- this is in a list
***bye!***
I'd like to be able to take the output:
{"ops":[{"insert":"hello\nthis is in a list"},{"attributes":{"list":"bullet"},"insert":"\n"},{"attributes":{"italic":true,"bold":true},"insert":"bye!"},{"insert":"\n"}]}
And somehow convert it to the equivalent HTML, i.e.
hello
<ul>
<li>this is in a list</li>
</ul>
<b><i>bye!</i></b>
Is there any way to do this out of the box?
Thanks for your help.
OK I figured this out.
It's possible to grab the HTML from the editor when it's on screen. I did this using quill.root.innerHTML.
So I need to save two things:
The Quill encoded text, used by the Quill editor only. I need this if I want to be able to load previously saved Quill text into the Quill editor.
The extracted HTML (via quill.root.innerHTML) which I can use to display the text on a webpage.

Angular JS Issue

I want to edit row of data table(which is coming from some rest api call,the data in datatable is populated through angular js).
My Question is I need to add one input field in each row and when I submit then all the data will go and save in the database.So can you guys help me adding input field and when I submit then how to get all the datatable data and make a JSON request.
enter image description here
Please refer the image and I need to add input field in notes column and when press save button then it should take all the 7 datas in datatable and make a json request.
javascript Code:
vm.dataTableInstance = $('.datatable-basic').DataTable({
data : priorityAttrs,
columns : [
{ data: 'priority', title : 'Priority', width : '10%' },
{ data: 'attrName', title : 'Attribute Name', width: '30%' },
{ data: 'notes', title : 'Notes' },
{ data: null, orderable : false, width:'5%', render : function(data, type, row){
return '<ul class="icons-list"><li class="delete-user text-danger-600" onclick="angular.element(this).scope().deleteAttribute(this, \''+data.attrName+'\')"><a><i class="icon-trash"></i></a></li></ul>';
}}
],
});
You can use Angular-Xeditable for add data tables. please refer this document.
install xeditable
bower install angular-xeditable
Include angular-xeditable into your project
add "xeditable" to dependencies
var app = angular.module("app", ["xeditable"]);

Ext.ux.Exporter.Button not exporting excel with data using ExtJS

I am trying to export Ext.Grid in excel or .xls but for some reason it will not fetch the data in Mac. The file is exported in .xlt format in windows and would not open in MS Office excel. Though the exported file has all the data when exported in Ubuntu and opened with Libre.
I am using the Ext.ux.Exporter as provided in the github. The file is Exporter-all.js which does all the work. I am really confused where am I going wrong?
This is the code on the excel export button,
var grid = new Ext.grid.GridPanel({
title: "Intersected Species Info",
store: stor,
width: 585,
height: 260,
stripeRows: true,
tbar: [],
columns: columns,
listeners: {
render: function (grid) {
grid.getSelectionModel().selectFirstRow();
}
}
});
var exportCSV = new Ext.ux.Exporter.Button({
component: grid,
text: 'Download CSV'
});
grid.getTopToolbar().add(exportCSV);
And this is from where I am importing the js file,
<script src="../exporter/Exporter-all.js" type="text/javascript"></script>
Where am I not correct?
That github repository you use is for ExtJS 3 if I'm not wrong. You can use this https://github.com/iwiznia/Ext.ux.Exporter instead.
Remember to replace Style.js inside excelFormatter folder, using this
Sorry to throw a bunch of links but this thread explains pretty well. You can also follow example here.

Resources