How to render the HTML icons inside a each cell in a column in ag-grid and make it clickable? - ag-grid

I need three icons/buttons in one cell in each row and make it clickable. In other words i will need three icons in each cell in specific column (rest of the column will have data), See attached image for example.
Language using: Angular and ag-grid techniques
See this mockup image for example

You can achieve the above functionality by creating a custom render component. checkout the similar example from AG Grid
Rendering using Angular Components

Related

AG Grid Column Filter List Missing Checkbox Icons

We're in the process of using AG Grid in an application to display and edit data, but are having some trouble with the column filter lists.
The icons for the columns being filtered do not have checkmark icons. The outline around the checkmark boxes changes colors, but there are no icons. I was able to recreate the issue in this sandbox: https://codesandbox.io/s/objective-galois-xx6b3z. Any ideas on how to fix this?
Expected behavior:
Checkbox icons should be visible as shown in AG Grid examples: https://www.ag-grid.com/examples/filter-set-filter-list/sorting-set-filter-values/packages/vanilla/index.html
Notes:
I created a very basic grid (see https://codesandbox.io/s/objective-galois-xx6b3z) to ensure that this issue is not related to any of the customizations we have added to our project
I tried using custom icons (see this in AG Grid's documentation), which were also not visible: https://www.ag-grid.com/examples/filter-set-filter-list/sorting-set-filter-values/packages/vanilla/index.html
You are trying to use Alpine theme with different fonts.
For this you will need to define CSS variable that will point to a different font:
.ag-theme-alpine, .ag-theme-alpine-dark {
--ag-icon-font-family: agGridMaterial;
}

How to set cell dividers on the ag grid

Currently out of the box my grid looks like this
https://www.ag-grid.com/javascript-grid-row-styles/#row-style
however I need the cells to be divided like they are on the grids on this page
https://www.ag-grid.com/javascript-grid-cell-styling/
anyone know how to set this value?
It is due to this theme ag-fresh (check that in the html markup, this theme class is applied).
When class="ag-theme-balham" is applied, you won't be able to see cell dividers.
You can also check the same on this ag-grid Demo page (change theme dropdown)

GWT Celltable column with label and image

I am looking to add a label and image to a CellTable column, with following requisites:
- Label should be followed by an image.
- Click on the column (anywhere on label or image), toggles the image.
I am thinking of creating a custom widget containing an HorizontalPanel. Which in itself contains the Label and Image. Before putting substantial time on the same, just want an confirmation whether this approach is proper ?
No, you cannot put a widget in a CellTable. You will have to make a custom cell (extend AbstractCell) and generate HTML directly.
Take a look at GWT's implementation of different cells to see how they achieve clicking, etc. There are no nice ClickEvents, for example - you have to respond to the browser events directly.
To toggle an image you will have to re-draw the entire table, or use crazy javascript that you don't want to use.

In LWUIT, how can i add multiple container/Layout on single Form?

In J2ME I am Using LWUIT library.
My problem is I want to add various component on single Form using different layout or Container. I am looking for some code or example.
Example..
add Header image on top of the Form.
Adding two label, two textfield on
one Container/layout and Two button
on another Container/layout. Design
like Login Form.
add Footer image on bottom of the
Form.
Set the title image of the form for showing header image. Set the softbutton image of the form for showing footer image.
Normally you can use the border layout or box layout for both container and form. See the LWUITDemo application on LWUIT repository. It will helps you. Also see the same sample examples,
The Lightweight User Interface Toolkit (LWUIT): An Introduction
Using LWUIT layouts
use different container with different layout to add in form
i.e set form to Borderlayout add title container to north and footer container to south
next use another container with your required layout and add it to center in form, thus create container hierarchy
For samples on how to arrange components in various layouts you can look within the LWUIT 1.5 distribution and on demos such as the LWUITDemo which has a layouts demo within it. Keep in mind that layouts can be nested.
The LWUIT blog which I maintain contains lots of samples of layout usage.

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.