slickgrid

Slickgrid column width should automatically get resized according to widest row content

て烟熏妆下的殇ゞ 提交于 2019-12-03 16:48:54
In Slickgrid is there any way where the column width automatically get resized according to widest row content? In the sample example I can see the value of column as hard coded for the column field http://mleibman.github.com/SlickGrid/examples/example2-formatters.html var columns = [ {id: "title", name: "Title", field: "title", width: 120, cssClass: "cell-title", formatter: formatter}, {id: "duration", name: "Duration", field: "duration"}, {id: "%", name: "% Complete", field: "percentComplete", width: 80, resizable: false, formatter: Slick.Formatters.PercentCompleteBar}, {id: "start", name:

access list of filtered items in dataview

*爱你&永不变心* 提交于 2019-12-03 12:48:10
I'm using a DataView to populate the Grid, and using filters to interact with the visible rows. My problem is after applying the filters, on rows change, or rows count change... how can I access the dataview to iterate over only those visible rows, to do some calculations for example? Because rows themselves are not publicly exposed... and if they were, a row is not always a data element, since can also refer to a Group, right? Is there an easy way to access those filtered data elements then? (I guess what I'm looking for is something like being able to access "var filteredItems =

Slickgrid - One-click checkboxes?

前提是你 提交于 2019-12-03 11:02:38
When I create a checkbox column (through use of formatters/editors) in Slickgrid, I've noticed that it takes two clicks to interact with it (one to focus the cell, and one to interact with the checkbox). (Which makes perfect sense) However, I've noticed that I am able to interact with the checkbox selectors plugin (for selecting multiple rows) with one click. Is there any way I can make ALL of my checkboxes behave this way? For futher readers I solved this problem by modifing the grid data itself on click event. Setting boolean value to opposite and then the formatter will display clicked or

Possible to hide a SlickGrid column WITHOUT removing it from the “columns” array?

自古美人都是妖i 提交于 2019-12-03 10:27:40
I'd like to hide a column (its an ID column that is unique for each row), but I cannot remove it from the "columns" array because I need that data in the Row when actions are performed on the Row (Selection, Sorting, ect). After being sorted for example, I need to grab the Rows match them up to the previous styles that they had before, and I can do this with the ID column. I need the data in the row, I just don't want it to be displayed. Thanks. The answer is NO, but that is not the answer you are looking for :) Other than what columns are looking at to grab their data, there is no hard link

SlickGrid setting row opacity

北慕城南 提交于 2019-12-03 09:10:55
I am using SlickGrid and am wondering if there is a way to set and keep a rows opacity or css styles in general. For example my rows have a checkbox in them and when the user sets the checkbox to checked then the opacity of the row is set. However when the user then clicks off the row the SlickGrid removes the opacity setting. One option if anyone knows how to do it is to set the opacity of the row after SlickGrid has done its re-render. this would allow me to use the jQuery below across the entire grid: $('img[src="slickgrid/images/tick.png"]').parent().parent().css('opacity','0.4'); Just in

SlickGrid: Simple example of using DataView rather than raw data?

旧时模样 提交于 2019-12-03 06:04:54
问题 I'm working with SlickGrid, binding data directly to the grid from an Ajax call. It's working well at the moment, the grid updates dynamically and is sortable, and I'm using a custom formatter for one column: var grid; var columns = [{ id: "time", name: "Date", field: "time" }, { id: "rating", name: "Rating", formatter: starFormatter // custom formatter } ]; var options = { enableColumnReorder: false, multiColumnSort: true }; // When user clicks button, fetch data via Ajax, and bind it to the

SlickGrid what is a Data View?

谁说我不能喝 提交于 2019-12-03 05:51:38
问题 I started to use SlickGrid and I got confused about the difference between Data View and Grid (with editing enabled). I haven't found in the docs some discussion about data view, although it has been mentioned there. Please enlighten me. 回答1: In very simple terms, just think of three layers: Grid ---- DataView ---- Data At the bottom you have the raw data. This is just a plain old array. Each item in the array represents one row of data (to be displayed as one row in the grid). The DataView

What is this design pattern known as in JavaScript/jQuery?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 02:53:38
I was looking over the JavaScript source code for SlickGrid . I've noticed that slick.grid.js has the following structure: (function($) { // Slick.Grid $.extend(true, window, { Slick: { Grid: SlickGrid } }); var scrollbarDimensions; // shared across all grids on this page //////////////////////////////////////////////////////////////////////////// // SlickGrid class implementation (available as Slick.Grid) /** * @param {Node} container Container node to create the grid in. * @param {Array,Object} data An array of objects for databinding. * @param {Array} columns An array of column definitions.

SlickGrid: Simple example of using DataView rather than raw data?

流过昼夜 提交于 2019-12-02 19:31:01
I'm working with SlickGrid, binding data directly to the grid from an Ajax call. It's working well at the moment, the grid updates dynamically and is sortable, and I'm using a custom formatter for one column: var grid; var columns = [{ id: "time", name: "Date", field: "time" }, { id: "rating", name: "Rating", formatter: starFormatter // custom formatter } ]; var options = { enableColumnReorder: false, multiColumnSort: true }; // When user clicks button, fetch data via Ajax, and bind it to the grid. $('#mybutton').click(function() { $.getJSON(my_url, function(data) { grid = new Slick.Grid("

SlickGrid what is a Data View?

*爱你&永不变心* 提交于 2019-12-02 19:13:04
I started to use SlickGrid and I got confused about the difference between Data View and Grid (with editing enabled). I haven't found in the docs some discussion about data view, although it has been mentioned there. Please enlighten me. njr101 In very simple terms, just think of three layers: Grid ---- DataView ---- Data At the bottom you have the raw data. This is just a plain old array. Each item in the array represents one row of data (to be displayed as one row in the grid). The DataView reads the data array and makes it available to the grid by exposing a couple of standard methods. This