EXTJS 4. How to set different editors in a grid for the same column? - extjs

Consider a simple grid with one column. I want to edit this column using grid editor. The problem is that I want a different editor for each row. For example
1st row --> textfield
2nd row --> datefield
3rd row --> combobox
4th row --> textfield etc
When I click a column field (for example, second row) I use the setEditor method, but this seems to change the editor for the whole column not the specific row.
How can I achieve the specific functionality with extjs 4?

Related

Put a Button on first row of WPF DataGrid Columns

I'm working on the WPF application.
My application has a DataGrid with 4 columns which works properly.
I only want the first row to have a Button with DataGrid width for inserting new data by user's click.
First row's columns may be use Column span.
Also I read How to add button in first row of datagrid column? .
This solution Insert Button to All Rows and control with Collapsing .
Thanks in advance for any help

How to add a Row to a Grid from a form using Extjs?

I am using Extjs 4.2.0 .I am trying to add a Row in a Grid from a TextField.What is the easiest way to do that.
Here i am using moving row from GridToGrid.Add Row button will add a row to grid one from hardCoded model values.But instead i need to add from the input text fields.
Check this . Here you can add new records to grid as well as edit existing records by loading them in form.
http://examples.sencha.com/extjs/5.1.0/examples/writer/writer.html

How to add input tag to the last row of ui grid on button click

I am having a situation where I want to add input box at the end of the table. Is it possible to do this in ui-grid. I know rowTemplate, but it applies to whole column. I want to apply only to the last row of the table.

ExtJs cell editing

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.

How to display too many columns in angular ui grid

In the angular ui grid i have too many columns to display.
Want to display extra columns as expand collapse under each row.
Which means expand/collapse button will be provided for each row and while exanding a particular row the extra columns headertemplate will b displayed along wil b displayed along with column values.
Is it poasible with angular ui grid
As far as , there is no an option for that.
You can use the following to make things work as you wish:
remove default row headers by setting to false enableExpandableRowHeader
adding a custom row header by calling $scope.gridApi.core.addRowHeaderColumn
For reference :
http://ui-grid.info/docs/#/tutorial/114_row_header.
http://ui-grid.info/docs/#/tutorial/216_expandable_grid.

Resources