grid

Magento admin grid sending data from Action to Controller

余生长醉 提交于 2019-12-01 20:33:54
I'm trying to write a custom action to run off of an admin grid that I have built. Is it possible to send a value from a column in the grid to the controller via either get or post? I've tried googling, but I cannot find a proper explanation for this anywhere. A link to an explanation of the column settings ('getter', 'type' etc.) would also be useful if this is available. Add this code to your Grid.php: $this->addColumn('action', array( 'header' => Mage::helper('yourmodulename')->__('Action'), 'width' => '100', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' =>

indexing spherical subset of 3d grid data in numpy

二次信任 提交于 2019-12-01 19:23:09
问题 I have a 3d grid with coordinates x = linspace(0, Lx, Nx) y = linspace(0, Ly, Ny) z = linspace(0, Lz, Nz) and I need to index points (i.e. x[i],y[j],z[k]) within some radius R of a position (x0,y0,z0). N_i can be quite large. I can do a simple loop to find what I need points=[] i0,j0,k0 = floor( (x0,y0,z0)/grid_spacing ) Nr = (i0,j0,k0)/grid_spacing + 2 for i in range(i0-Nr, i0+Nr): for j in range(j0-Nr, j0+Nr): for k in range(k0-Nr, k0+Nr): if norm(array([i,j,k])*grid_spacing - (x0,y0,k0)) <

indexing spherical subset of 3d grid data in numpy

随声附和 提交于 2019-12-01 17:52:42
I have a 3d grid with coordinates x = linspace(0, Lx, Nx) y = linspace(0, Ly, Ny) z = linspace(0, Lz, Nz) and I need to index points (i.e. x[i],y[j],z[k]) within some radius R of a position (x0,y0,z0). N_i can be quite large. I can do a simple loop to find what I need points=[] i0,j0,k0 = floor( (x0,y0,z0)/grid_spacing ) Nr = (i0,j0,k0)/grid_spacing + 2 for i in range(i0-Nr, i0+Nr): for j in range(j0-Nr, j0+Nr): for k in range(k0-Nr, k0+Nr): if norm(array([i,j,k])*grid_spacing - (x0,y0,k0)) < cutoff: points.append((i,j,k)) but this quite slow. Is there a more natural/ faster way to do this

How do I bring an item to the front in wpf?

风流意气都作罢 提交于 2019-12-01 15:20:11
I simply have two grid on top of one another. Given one state of the world, I want grid A to be on top, given another state of the world, I want grid B to be on top. In the old days we could just call grid.BringToFront(), but that doesn't exist anymore, and I can't figure out any way to make that happen. The best I can figure, I need to create my own custom classes to allow this functionality, but that seems like major overkill for something that used to be so simple. Ifeanyi Echeruo You can use the Panel.ZIndex property to change the display order of elements in a panel You have to use the Z

How do I bring an item to the front in wpf?

狂风中的少年 提交于 2019-12-01 14:14:50
问题 I simply have two grid on top of one another. Given one state of the world, I want grid A to be on top, given another state of the world, I want grid B to be on top. In the old days we could just call grid.BringToFront(), but that doesn't exist anymore, and I can't figure out any way to make that happen. The best I can figure, I need to create my own custom classes to allow this functionality, but that seems like major overkill for something that used to be so simple. 回答1: You can use the

Using Vaadin 7.4.9 - How to delete data from the grid

∥☆過路亽.° 提交于 2019-12-01 13:41:08
I need to delete data from the grid (container) and then i need refresh the rows. How I can do it? Grid grid = new Grid(); IndexedContainer container = new IndexedContainer(); grid.setContainerDataSource(container); container.addContainerProperty("firstNumber", Integer.class, 0); container.addContainerProperty("secondNumber", Integer.class, 0); container.addItem(1); Item item = container.getItem(1); int firstNumber = item.getItemProperty("firstNumber").setValue("1"); item = container.getItem(1); int secondNumber = item.getItemProperty("secondNumber").setValue("2"); Now I try to change cell

Retain the already present value of the cell for edit on click

孤街醉人 提交于 2019-12-01 13:40:28
I've a grid cloumn with xtype:datecolumn as below, Now what happens is when i want to alter the value of the cell , i.e change the time on click the cell becomes blank for editing and on clicking way the previous value comes back, I want the value to be present to edit on click this is my gridcolumn { text: ' Time', dataIndex: 'time', xtype: 'datecolumn', format: 'Y-m-d H:i:s', editor: { xtype: 'datefield', format: 'Y-m-d H:i:s', allowBlank: false, maskRe: /[0-9,:,-]/ } }, How will I be achieve this? To edit the same old value rather than going blank and choosing the new date Thanks It was the

Coordinate Algorithm - Rotate around the center

强颜欢笑 提交于 2019-12-01 13:12:35
By looking at this image I think you will understand my problem pretty well: (image removed - url no longer valid, returns advertising now) So basically I want a function that takes an object as parameter and gives this object the correct coordinates based on how many objects I've added before. Let's say I would add all these objects to an array: objectArray[] Each time I add a new object: objectArray.add(object) The object.x and object.y coordinates will be set based on some algorithm: object.x = ? object.y = ? (I'm working in Java) Thanks for any help. Here's the closed-form solution that

Using Vaadin 7.4.9 - How to delete data from the grid

浪尽此生 提交于 2019-12-01 11:35:17
问题 I need to delete data from the grid (container) and then i need refresh the rows. How I can do it? Grid grid = new Grid(); IndexedContainer container = new IndexedContainer(); grid.setContainerDataSource(container); container.addContainerProperty("firstNumber", Integer.class, 0); container.addContainerProperty("secondNumber", Integer.class, 0); container.addItem(1); Item item = container.getItem(1); int firstNumber = item.getItemProperty("firstNumber").setValue("1"); item = container.getItem

Animate Grid from one position to another

给你一囗甜甜゛ 提交于 2019-12-01 11:34:34
I have a grid of images and buttons, and I want to animate motion from one position to another (actually a few spaces to the left) automatically, but it hasn't worked. I've tried using a storyboard in xaml and programatically as in the code below, but its now working. Please help!!! public static void MoveTo(Grid target) { Canvas.SetLeft(target, 0); var top = Canvas.GetTop(target); var left = Canvas.GetLeft(target); TranslateTransform trans = new TranslateTransform(); target.RenderTransform = trans; double newX = (double)(left - 300); double newY = (double)top; DoubleAnimation anim1 = new