Tabulator.info: combine custom and built-in formatters? - tabulator

I am using a custom formatter callback to highlight keywords in a text column. But I also want the full text displayed in the cell, i.e. wrapped, just like the built-in formatter 'textarea' does.
Is there a way to use both custom and built-in formatters?

You can only apply once formatter to any given cell, in your case the best approach would be to tweak your custom formatter to add the text area formatters functionality.
Which will be as simple as adding this line of code to your custom formatter:
cell.getElement().style.whiteSpace = "pre-wrap";
If you are using a formatter that may result in the contents being of variable height then you will also need to set the variableHeight property in that columns definition to ensure the rows render correctly:
{title:"Name", field:"name", formatter:myCustomFormatter, variableHeight:true}

Related

OData value (color) applied to SAPUI5 table

I wanted to know if the following is possible:
I've got an oData which has two fields related with colors
Colors are set as RGB because I thought it would be easier to pick them up to use it as styles in frontend.
I have a table in which I want to assign these colors to a specific cell, depending on 'ORGNA'.
I would like the row to have background-color red where Especialidad="UROLOGIA" (for example), but that color must come from the OData values I've got stored(see first image).
'ORGNA' values are the ones shown as 'Especialidad' (which means that 39ONC would be shown as 'Oncologia' and so on in the table).
I also wanted to know if this is possible or they must be set specifically from a Styles.css file.
Maybe there's some property like setColor or is there any way to add a background-color tag inside my XML View passing that OData values?
If you need any additional code, please just let me know.

Tabulator | Filterbox

Tabulator offers a wide range of options to programmatically filter data, however I could not find a way to render on the page the dropdown and textbox used to actually filter data on the table.
It seems the only option that render a filter element on the Table is: headerFilter.
It looks weird that I have to create dropdown and searchbox myself?
Here is the link to their page dealing with Filters: http://tabulator.info/docs/4.1/filter
Please advise, thank you
You can use any of tabulators Editors as header filters
The Examples Page contains a fully working example of a table with a selection of header filters including text boxes and select elements
in the column definition you just have to use the headerFilter property, in this case we also use the headerFilterParams option to make the select element populate from the names in the column:
{title:"Name", field:"name" headerFilter:"select", headerFilterParams:{values:true}}
or for a simple input element
{title:"Name", field:"name" headerFilter:"input"}

Is there a way to create a widget with configuration wrap and select_range method?

I have a problem. In Tkinter there are two widgets: Text and Entry. The Text widget has a configuration wrap='word'. And the Entry widget has a method select_range. I need both the wrap configuration and the select_range method in order to select certain parts of a massive text (by select I mean like with the mouse).
There is no direct way to combine the features of two different widgets, but there's really no need to do that. All you're asking for is the ability to select a range of text, and the text widget supports that.
The method to select a range of characters is documented. All you need to do is add the tag "sel" to a range of characters.

Custom attributes/properties for cells in excel?

I'm interested in making an Excel cell formatting macro that allows me to scroll through different options (different font/cell colors, different border types, etc.). I know that I could accomplish this by checking conditions -- if I'm changing font colors, then I can just "scroll" by using conditional logic (if color1, then change to color2; if color2, then change to color 3; etc.). I was wondering if there might be a more elegant way to accomplish this -- specifically, is there a way to store custom attributes for cells in VBA?
For example, if I set cell B3 to a certain border style (thin line for top,left,right but double line for bottom), is there a way to create and set a VBA attribute of Cell.CustomBorderStyle = 1? Otherwise, I believe I would have to build logic into my macro for the precise formatting (if top,left,right = thin and bottom = double then change to second style, etc.). I'm not sure if creating a custom class in VBA would allow me to do this, or if there's any way at all to do this.
Please let me know if my question is unclear -- thanks!
if you only want the cell attribute to be available within this VBA session then I would use a collection or dictionary with a key of the cell address (Sheet_Row_Column) to store the attribute(s).
If you want to persist this information within an Excel workbook then it would probably be best done using custom xml.

Filterable SPFIeldUrl in default view

I`v added a hyperlink (SPFieldUrl class) column (field) with GUI to my list.
Pity, but I cannot filter those values when viewing the list.
alt text http://img5.imageshack.us/img5/5126/ss20090505152613.png
(It reads that you cannot filter this column type)
Is there any way to have it easy filterable with clicking on columns besides creating a custom view?
Thank you.
Depending on how you are using the url, you may be able to do something with calculated columns.
Another option is to use a text field rather than a url field - The url field type is effectively a combination of two fields, so you may be able to get what you are looking for by creating those two field seperately.

Resources