slickgrid

How to properly use formatter and editor in Slickgrid

两盒软妹~` 提交于 2019-12-24 14:34:07
问题 We are using slickgrid in our angular directive. And we would like to use another list directive (simple select element with input) in a cell/column of Slickgrid. I want the list element to be visible when the grid is available, so user knows there is a list. Therefor I am using the list directive as formatter. It Is visible when the grid is rendered. The Problem: When the cell that holds list element is clicked, the editor mode is never fired because of the list element click event. We

Adding function to namespace/module from another file

谁都会走 提交于 2019-12-24 14:31:48
问题 I ma writing custom editor for slickgrid. slick.editors.js /*** * Contains basic SlickGrid editors. * @module Editors * @namespace Slick */ (function ($) { // register namespace $.extend(true, window, { "Slick": { "Editors": { "Text": TextEditor, "Integer": IntegerEditor, "Float": FloatEditor, "Date": DateEditor, "YesNoSelect": YesNoSelectEditor, "Checkbox": CheckboxEditor, "PercentComplete": PercentCompleteEditor, "LongText": LongTextEditor } } }); function TextEditor(args) { var $input; var

How to enable column reordering in SlickGird via drag/drop?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 07:45:53
问题 I've seen it done in the samples, but can't get it to work on my Grid. What do I need to do in order to allow drag/drop column reordering in SlickGrid? Thanks. 回答1: To create the grid, you should be doing something like: grid = new Slick.Grid($("#myGrid"), data, columns, options); options is a dictionary that you can use to change the behavior of the slickgrid. Make sure that the enableColumnReorder key is set to true: var options = { enableColumnReorder: true }; If this does not work, please

Display the total number of rows in a Slickgrid table

这一生的挚爱 提交于 2019-12-24 03:07:32
问题 Is there an accepted way to display the total number of rows in a slickgrid table. I see that there is a pager that I can include on my pages, but that comes with additional buttons/settings for pagination. I am using a DataView object with no grouping. Ideally I'd like to simply have a trivial row at the bottom of the viewport that lists how many rows are in the table. I could do this manually but wasn't sure if I was missing something in the Slickgrid APIs/configuration. 回答1: Use this

Slickgrid - Replacing all grid data from AJAX source

扶醉桌前 提交于 2019-12-24 03:04:38
问题 In the app I'm building, I have a data grid and some select boxes where the user can set filters and upon a selection it makes an AJAX call to get a new array of data from the server. I have the grid initializing with default filters, but I can't figure out how to wipe the grid of all rows, and re-populate with a fresh array. I was trying dataView, but after reading some posts this seems to not be the answer. I find the official example-6 (ajax example) confusing. I would like column sorting

Slickgrid Horizontal Scrollbar Covers Last Row

邮差的信 提交于 2019-12-24 02:57:08
问题 When a Slickgrid is contained in a div with fixed width and a horizontal scrollbar becomes necessary, that scrollbar covers the last row of data. http://jsfiddle.net/ericjohannsen/LtsvJ/ How can that be fixed? 回答1: Fixed in https://github.com/mleibman/SlickGrid/commit/6d3b8a0844a0ef8528b11e67ef0bd0f5265d1c7b. 来源: https://stackoverflow.com/questions/11806720/slickgrid-horizontal-scrollbar-covers-last-row

SlickGrid Display Aggregation at grouping level

自作多情 提交于 2019-12-23 22:30:26
问题 I am following this example for grouping with aggregation: http://mleibman.github.io/SlickGrid/examples/example-grouping.html This has grouping done in one row and Aggregation done in separate row. I want both to be displayed in same instead of having two separate rows For e.g In above exampple i want to a single row to like + Duration : 3 (4 items) avg: 20 % cost:60 And then we click on expand button we see all details inside it. Any suggestions? 回答1: You need to change the formatter and the

Slickgrid save all data at once

走远了吗. 提交于 2019-12-22 11:26:51
问题 I am trying to save all the data in a slickgrid at once rather than one at a time, my plan was to use Saving changes in SlickGrid so my code is : <script language='javascript' type="text/javascript"> function saveQuote() { $("input[name='mydata']").val(jQuery.parseJSON(grid.getData())); } </script> with my data being a textbox ... (so I can debug and see what is happening) My Grid is empty to begin with and the user adding data(which has calculations etc) however when I press my save button

How do I create merged cells in SlickGrid?

こ雲淡風輕ζ 提交于 2019-12-22 10:35:24
问题 Is it possible to create merged cells in SlickGrid? If not, then what other javascript grid solutions allow merged cells. 回答1: If you mean cells spanning across multiple columns, this is supported via "colspan" as demonstrated in this example - http://mleibman.github.com/SlickGrid/examples/example-colspan.html. Spanning cells vertically across multiple rows is not supported. 回答2: I have got some codes when using formatter to merge cells in the differnect rows. Tin, please can you check this

What is the recommended approach to style a SlickGrid?

旧巷老猫 提交于 2019-12-22 04:06:19
问题 I am just starting to use SlickGrid and amazed by its quality. However, when it comes to styling, I did not find any docs or examples recommending an overall styling approach. There are options and APIs scattered in various places, but it's very difficult to extract a strategy out of those. Also the grid leverages jQuery UI themes. Unfortunately those are interfering with what I am trying to achieve. We have picked up jQuery UI only for the calendar widget along with the ui-darkness theme.