ExtJs cell editing - extjs

I have a grid with 3 columns and 5 rows.
I have attached a CellEditing plugin to the grid.
And for the 3rd column i have defined an numberfield editior.
So now due to this each row 3rd column has a numberfield editor attached to it.
But due to some condition present in data/column metadata, i want to disable the numberfield editor for 2nd and 4th row.
I am unable to disable cell editor for particular rows as the editor is attached at the column level.
Is there a way in ExtJS to handle this kind of scenario.
I am using ExtJS 5.

As noted in the comments by Evan, you need to use the beforeedit event to veto the edit before it starts.
ExtJS does not attach an editor to every cell. Instead, when the user triggers the edit (e.g. by single- or double-clicking on the grid cell), the CellEditing plugin will be invoked. If the beforeedit event is not vetoed, it will then attach the edit field to the cell in place. When the edit is finished, the edit field will be detached.
If you want to style the non-editable fields differently, to help indicate that they are not editable, the column can be assigned a renderer, which will allow you to provide cell-specific attributes, including CSS style.

Related

AgGrid loose edit mode when data is updated

I use AgGrid Enterprise, and allow users to edit an entire row so all cells switch to edit mode.
I also have an event listener to save the row in database when the user put the focus on a new line or outside the grid.
In the first column of my grid, i have a custom cell displaying a combo.
When the user select a value, it should update the cell AND 3 other cells in the row.
So i use the API to refresh the 3 cells.
Doing so put the cell in view mode, i loose the edit mode and the save event is triggered.
Is there a way in edit mode, to update cell content without loosing the edit mode ??
Thanks a lot.
You said your are try to entire row and and also have custom cell with combo
but ag-grid does not work any popup editor with full row edit.
You have to remove ag-grid property editType: 'fullRow' and it will work.
https://www.ag-grid.com/javascript-grid-cell-editing/#gsc.tab=0

ExtJS 5 Using a Combobox with a trigger in CellEditing Grid

I am having a issue when using a cell editing grid that has a field that opens a window. The issue is when you open the editor for the field and click on one of the combobox triggers, a window opens, which causes the field to fire validateedit, resulting in the editor closing. I am looking for a way to prevent this. The reason that I am opening a window is that I am giving the user the ability to quickly add a new record to the combobox, without having to go to another place in the system. I am able to get this functionality to work with row editing but my customer does not like they way row editing works.
Here is my fiddle example.

Angular ui grid make a non editable row into editable

I am trying to add edit, trash icons to Angular UI grid. On click on a particular row I want to allow the user to only edit the particular row.
Is there any api method available which will make non editable row into editable row on fly? I want to disable the feature of making ui grid editable if user double clicks it as well.
you can refer to the ui-grid 201 Edit Feature
if you want to edit the row, please use the method:cellEditableCondition

ExtJS grid-like custom control

I need to implement grid like control that utilizes some complex custom widgets for viewing and displaying rows. Just like this one:
The key point here is that controls in the right column depend on the value selected in the combobox from the left column.
Does anyone know what is the best way to implement it using ExtJS 5.0 components? Should I create my own widgets to display row data that will serve as both custom renderers and editors?
I would use a beforeedit function which changes the editor of the right column (setEditor) to the required widget type depending on what is set in the left column. If you use Editing (RowEdit) plugin instead of CellEditing, you would also have to setEditor in the left column's change or select event.
This is the easiest way, but it won't show all editors at once, of course.
To have all editors displayed at once, I would make a new field containing multiple fields. You can add multiple instances of these fields to a fieldset, container, panel or form at runtime.

On Click on the RowHeader the current row should be editable and On click of the columnHearder current column of all row should be editable

I have a silverlight DataGrid, by default on page load the all the cells of the datagrid should be Readonly. I have 2 problem , can any one help me?
1.On Click on the RowHeader the current row should be editable
2. On click of the columnHearder current column of all row should be editable
This might not solve your entire problem but it should partially address it.
This is to make a column read-only in a datagrid
DataGrid.Columns[7].IsReadOnly = true;
Obviously the property can be changed from events but the data grid does not have row/column headers event handlers. Custom controls seem the way to go without introducing any new gui elements like buttons and changing the feel of the application.

Resources