Grid cells with bullet points - extjs

I am trying to implement a ExtJS based grid where users would change column data or enter empty columns. Is there a way to show/enter contents as bullet points on ExtJS grid cell like we usually do in Excel?
Thanks in advance

Check this fiddle - https://fiddle.sencha.com/#fiddle/mpl
The Idea is to use htmleditor as the column editor in your grid. However, there'll be quite a lot of work involved in positioning and styling when the html editor opens up for editing.
The fiddle that I created contains just the editor with no styling so it doesn't open good. And when you try, try editing the first column in third row data.

Related

Material Table - is it possible to move row selection text from toolbar to the bottom of page

I'm using Material Table at the moment and am having difficulty customizing the position of the selection text (presented when one or more rows are selected via the checkbox).
Looking at the documents, I can see that the toolbar is overridable (https://material-table.com/#/docs/features/component-overriding), however the examples show simpler changes e.g. how to change the background color. I wonder if it's possible to separate the selection text from the toolbar and render it in a different location, like the below picture demonstrates.
Does anyone know if this is possible?
In the end, I turned off the row selection text in the toolbar by using showTextRowsSelected: false
I then made a custom footer using the row data presented by the onSelectionChange handler.

How to hide the entire Ext.selection.CheckboxModel in ExtJS grid

I need to hide the entire column of the check box (Ext.selection.CheckboxModel). I found out to get the columns of the grid to hide, but the columns does not give the checkbox column.
grid.headerCt.items.getAt(0).hide()
This worked for me in 4.2.2. I used a combination of the other answer by Saki and a little traversing through the DOM because the "getAt0).hide()" solution did not work for me either:
grid.headerCt.items.items[0].hidden = true;

Subgrid in ng-grid

I have just started with angularjs. Just wanted to know that if it is possible to create a sub grid inside another ng-grid. There would be some links in a column of the grid and when I click a particular link a grid corresponding to that link should be formed inside the already existing grid.The original grid would be having say 5 columns while the new grid will have say 4 columns. So something on the lines of colspan or something similar is what I look for.
If you are open for writing Angular Directive then you can use any grid ,other than ng-grid which has subgrid feature.
I know like Kendo Grid has subgrid feature and jqgrid has subgrid feature. I wrote a Grid using Google Closure library , this also has subgrid feature.
If I understand your question, you need something like master/details inside grid, it not part of base functionality. nggrid has fixed row height, for virtual scrolling purpose. On our project we have created custom grid plugin base on nggrid
Solution that we used is:
write custom sort function, which populate duplicated rows always below main
when we click expand button we duplicate current row n-times depend on subgrid height
in main row we create css overlay container which hides duplicated rows
load overlay container content via ajax
When we click hide button, we hide overlay, and remove duplicated rows.

How to dynamically update grid cell color and tool tip based on user action in Extjs 4?

Based on a user action, like click of a button, we need to update a grid cell and modify its background color and tool-tip.
Please note that it has to be only a particular cell of grid record and not the entire column affecting all the records.
Thus, how can we update these two things for a particular grid record cell - background color and tool-tip - dynamically?
Thanks for help in advance.
PS: ExtJs version 4.1.1
I have been able to find a solution for this. Though, not sure if its the best way, but posting it here as it may help someone looking for the same.
The solution is to write custom renderer function for the column which needs to be updated and calling the following code on the user action at which the update is required (like in the handler of the button clicked):
grid.getView().refresh();
The above code will invoke the column renderer function and this renderer function should be able to judge which background color and tool-tip to be applied at the grid column as per the current state of application.
Hope this helps.

How to update a Ext JS 4 grid when popup form is submitted

Please point me to an Ext JS 4 code sample of a grid with records editable via a popup form. It seems to be a common use case, but I can only find editable grids with editing in place.
My approach:
Each row in the grid has an Edit button, which shows Ext.window.Window with an item Ext.form.Panel.
When the form is submitted I have all the fields, which correspond to a record in the grid store.
I get record using:
var storeRecord = grid.getStore().getAt(index);
But when I modify properties of this record, and hide the form window, the grid does not show updated values.
Am I missing some step? Do I need to force refresh? Or maybe there is a standard way to configure the grid with an editor as a form panel?
After two days of searches, trials and errors, I found the solution:
grid.getView().refresh();
I wish there was a faster way for Ext learning curve. :(

Resources