slickgrid

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

风格不统一 提交于 2019-12-09 04:51:47
问题 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

How to add a class to a cell in SlickGrid

时光怂恿深爱的人放手 提交于 2019-12-09 02:49:17
问题 Does anyone has an idea how could I add "myClass" class to some cell (for example, row 5, column 3) in a SlickGrid ? 回答1: To add a specific CSS class to some of the rows, use the "rowClasses" option added recently in http://github.com/mleibman/SlickGrid/commit/26d525a136e74e0fd36f6d45f0d53d1ce2df40ed You cannot add a CSS class to a specific cell, only to all cells in a given column - use the "cssClass" property on the column definition. Perhaps you can use a combination of those two. Another

Good tutorial for SlickGrid? [closed]

霸气de小男生 提交于 2019-12-08 16:23:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am interested in getting familiar with SlickGrid but the only info I can find seems to be examples and the source code. Can anyone recommend a good source for documentation and tutorials? 回答1: I have been using SlickGrid for a few weeks now and could not find a decent tutorial. I learned mostly from the

How to get the object which represents the selected row in a slickgrid

自作多情 提交于 2019-12-08 10:28:33
问题 I have a webpage with a slickgrid which renders an array of objects on a grid. I want to do some dynamic stuff (a master-detail like setup) when the selected row changes. However to be able to do this, I would need the data of the selected row. I know that the grid.getCurrentCellNode() function will give me the dom element of the current node, but what I am looking for is a javascript object. For instance, if I use an array of objects like the one below data = [ {id:1, name:'Khaja', dob:'26

SlickGrid column type

孤人 提交于 2019-12-08 09:52:38
问题 I want to do own filtering function for SlickGrid filters, which ussually will be unify and can used in 99 % . What I missed in Slickgrid - which type of data is used in column ? Maybe it alreday exist, but after reviewing sources I didn't found . If that exist - I will be thankfulll if you direct me to true path . Slick.Editors type ? But if column isn't for editing ? ... In samples of SlickGrid ussually use filters not allowing to data type , exist only some examples with concrete field Id.

How do I return a specific cell value in SlickGrid?

坚强是说给别人听的谎言 提交于 2019-12-08 03:45:09
问题 For the life of me I can't seem to return a specific cell value in SlickGrid. There is an example on SO here. But this did not work either. I am using the SlickGrid tutorial #7 as my example. All I am trying to do is add a click event to a cell that returns that cells value. Note: I am loading my data via JSON request and all works well. My click event fires but the value is undefined. For brevity sake I will omit my grid columns and options code. Here is the code and thanks. All and all this

Make one column fill remaining space in SlickGrid without messing up explicit width columns

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 17:58:37
问题 Some of my columns need explicit widths, while others should just fill up all available space. There is a forceFitColumns option, but it seems to ignore any explicit widths I've set. I want my explicit widths to be respected, and for implicit ones to be estimated sanely. I guess to get this behavior I'd have to disable the default column width and rewrite autoSizeColumns to not mess up my explicit column widths. I can imagine a convention where you put in '*' for the column width if you'd

Missing space when I change the cell's background color in SlickGrid?

橙三吉。 提交于 2019-12-07 09:36:44
问题 I was trying to change cell's background color with custom formatter like this: var myCellFormatter = function(row, cell, value, columnDef, dataContext) { if ((row + cell) % 5 == 1) { return "<div style='background-color:green'>" + value + "</div>"; } else { return value; } }; but this does not color the whole cell. There is some space between cell's div and the div in the formatter. How could I color the whole cell ? 回答1: Add a CSS class to that column ( columnDefinition.cssClass="myCell" )

SlickGrid styling after cell edit

大城市里の小女人 提交于 2019-12-06 15:21:56
I'm using SlickGrid (2.0) dataView with slick.editors. In the Grid, a user can edit any number of cells which then modifies the underlying grid data so that the edits are maintained when the grid scrolls. This works great. But I also want to provide visual feedback for all the edits since these are not saved to the database until user hit "Save Edits" button. Problem is that the editor method resets the cell after it reads back the changed grid data. I need to maintain a background color change to indicate that it's been edited. Has anyone been able to do this? Here is the relevent code

Slickgrid Treeview Search

时光毁灭记忆、已成空白 提交于 2019-12-06 14:27:02
I am currently implementing a treeview using slickgrid. My code is essentially based on this example . What I am trying to do is get a search filter, similar to the one in the example, but which works on the branches as well as the parents. For instance if a tree looks like this: -Parent 1 -branch 1 -sub_branch 1 -branch 2 -Parent 2 -branch 1 -branch 2 and I search for the number '1' it should show this: -Parent 1 -branch 1 -sub_branch 1 -branch 2 -Parent 2 -branch 1 rather than this: -Parent 1 Sorry I don't have any of my code to show, I've not got anywhere. Any ideas? Thanks Binke UPDATE: I