grid

Implementing Delete and Edit operations in jqgrid

北城余情 提交于 2019-11-29 16:57:55
i have the following JQgrid implementation colModel: [ { name: 'NameEn', index: 'NameEn', width: 100, align: 'left' }, { name: 'Desc', index: 'Desc', width: 100, align: 'left' }, { name: 'ID', index: 'ID', width: 100, align: 'left', hidden:true } ], caption: "Management", gridview: true, rownumbers: true, rownumWidth: 40, scroll: 0, rowNum: 100, sortname: 'ID', pager: '#pager', sortorder: "asc", viewrecords: true, autowidth: true, width: '100%', height: '100%', jsonReader: { root: "GridData", page: "CurrentPage", total: "TotalPages", records: "TotalRecords", repeatitems: false, id: "00" } };

Using a text file to lay out a words into a grid form

穿精又带淫゛_ 提交于 2019-11-29 16:34:48
I have a list of 6 words from a text file and would like to open the file to read the list of words as a 3x2 grid, also being able to randomise the order of the words every time the program is run. words are: cat, dog, hamster, frog, snail, snake i want them to display as: (but every time the program is run to do this in a random order) cat dog hamster frog snail snake so far all i've managed to do is get a single word from the list of 6 words to appear in a random order using - help would be much appriciated import random words_file = random.choice(open('words.txt', 'r').readlines()) print

show different item on selectionchange on a grid

六眼飞鱼酱① 提交于 2019-11-29 15:52:20
i have a grid and a form, i need to show different items on the form each time we select a row on that grid i ve been looking on how to do this, and found Ext.getCmp('myform').hide() // or .show() and listeners: { selectionchange: function () {...} now i dont know which row is selected so i can specify which item to show thanks Try to following code in your grid. listeners:{ itemclick:function(view, record, item, index, e ) { var v = record.get('firstName'); .... .... } } firstName will be your dataindex of colums in your grid. You can get value of any field like this. You get the selected

Saving Changes in SlickGrid with php

两盒软妹~` 提交于 2019-11-29 15:35:27
问题 I have a SlickGrid set up, it is reading data from my database with PHP, my problem is arising when i try to save the data back to my database, I am trying to use JSON to give me an array that I can then use to write back to the database, i have see this thread explaining this: Saving changes in SlickGrid So I have the hidden form element in my code, and am using JSON to encode the data variable, the assign it to the data hidden input on the form, this form posts to a page called save_price

Bootstrap grid won't work using xs columns

╄→гoц情女王★ 提交于 2019-11-29 15:33:14
I started a new project on Codepen and I'm using bootstrap.. It's been a while since I worked CSS. The grid sistem is not responding for me, I can't find the problem. I even copied a working older proyect and didn't work neither.. Here is the pen: http://codepen.io/Chantun/pen/NjgpaY Here's the html: <body> <div class="container-fluid"> <div class="row"> <div class="col-xs-offset-3 col-xs-6"> <h1>FFC Calculator</h1> </div> </div> </div> </body> Here's the CSS: body { position: relative; margin-top: 60px; font-family: Arimo, 'Roboto Slab', serif; background-color: #1a3a50; text-decoration:none;

dashed ticklines/gridlines in flot

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 15:23:23
问题 I am pretty new to this flot API. I want to have dashed gridlines/ticklines instead of solid line both X-axis' and Y-axis'. Can anyone help me with this?? Thanks in advance! 回答1: I was able to produce dashed lines for the grid's markings by modifying the library. I'm currently using Flot ver 0.8.0 First I added a new attribute under grid (around line 400), just below the markingsLineWidth: markingsStyle: 'dashed' Since Flot is using canvas to render the charts, I added a dashedLineTo()

Python 'list indices must be integers, not tuple\" error

泪湿孤枕 提交于 2019-11-29 15:10:11
I'm working on moving a robot around a 2d grid room of 8 x 8, and one part is initialising the sensors which consist of the closest 5 tiles around the robot. self.sensors = [0 for x in xrange(5)] here I'm creating an empty of array of 5 elements. but when I attempt to set the value of sensors like this: if self.heading == 'East': self.sensors[0] = self.room[self.x, self.y-1] self.sensors[1] = self.room[self.x+1, self.y-1] self.sensors[2] = self.room[self.x+1, self.y] self.sensors[3] = self.room[self.x+1, self.y+1] self.sensors[4] = self.room[self.x, self.y+1] I get the error of 'list indices

Override standard method called by double click event in CRM grid.

主宰稳场 提交于 2019-11-29 15:06:54
Following situation in CRM 2011: My goal is to show several entities in one grid. Therefore we made a wrapper entity which links to the real entity (wrapper entity to entity A, B, C). When an item in A, B or C is created, also an wrapper entity item is created by a plugin. Like this I can have a grid, "mixing" all the entities, while in fact only show the items of the wrapper entity. But of course, if I do a double click or right click -> open in this grid, I don't want to open the wrapper entity item, I directly want to open the window of e.g. entity A item. Ribbon Button is no problem btw. I

Extjs Grid- disable some checkbox on special row

半腔热情 提交于 2019-11-29 13:52:34
I have a simple gridpanel with a column using xtype:checkcolumn Ext.define('Ext.abc.grid', { extend: 'Ext.grid.Panel', columns: [ { text: 'id', dataIndex: 'id' }, { text: 'status', dataIndex: 'abc', xtype: 'checkcolumn', /*viewConfig: { getClass: function(Value, metaData, record){ }) },*/ listeners:{ beforecheckchange: function(column, row, checked, opts){ }, checkchange:function(cc,ix,isChecked){ } } } ] }); I want to disable some checkboxes on a special row by column id. Is it possible? How can I do that? Thanks. I took a look into the code of Ext.grid.column.CheckColumn , and I think the

WPF Grid - How to apply a style for just one column?

大兔子大兔子 提交于 2019-11-29 12:51:22
问题 I have a WPF Grid with many rows and columns, all containing things like TextBlocks and TextBoxes. For this specific situation I want all the stuff in column 1 to have padding, and all the stuff in column 2 to be aligned right. It seems to be very non-WPF to have to set those properties on each item in the grid. I know I can create a style for all TextBlocks within a grid by doing something like this: <Grid> <Grid.Resources> <Style TargetType="{x:Type TextBox}"> <Setter Property=