tablesorter Plugin Add Column Dynamic - tablesorter

I am Using my project Tablesorter Plugin, I am Dynamic Added and Removed COLUMN and Rows, Also Delete Column and Rows,
Remove Column Rows And Add Rows Sortable Function Working Perfectly,
But Add New Column Dynamic Then Table Sorter Not Working.
Please Help how i solve This Problem.
I got The Following Error
**TypeError: h[list[i][0]] is undefined
h[list[i][0]].addClass(css[list[i][1]]);**
I Create Dynamic Column in Table, and I am Click The New Column Header.

The original tablesorter (tablesorter.com) is will not work correctly if you add or remove columns, even if you trigger the "update" method. It is only designed to work with changes to the tbody.
You can use my fork of tablesorter to work properly in your case by triggering the "updateAll" method as follows:
var resort = true, // re-apply the current sort
callback = function(table){
alert('table updated!');
};
// let the plugin know that we made a update, then the plugin will
// automatically sort the table based on the header settings
$("table").trigger("updateAll", [ resort, callback ]);
Please note, the sortList option does update from its initial setting and always contains the current sort; but, it will not apply to the same column (it's a zero-based index) if a new column is inserted to the left of that sorted column.

Related

Datastudio Chart Configuration Incomplete when no data present and only headers

Good morning,
I have a spreadsheet that currently doesn't have any data in it, only headers.
If I put some dummy data in it, the fields are pulled in with no problem and charts display properly in google studio dash. However, if I remove the data and keep only the headers (waiting for the user to input data entry), all the charts utilizing the particular sheet show 'Chart Configuration Incomplete'. When I view the data source and refresh it, it states all the fields are missing. Only if there is an entry in addition to the headers, the fields show and charts work as expected. Is there a way around this by chance? Why can't the charts just show blank? I have the 'First Row as Headers' selected.
Try adding a row of dummy data (so all the fields will be added to your source) but then adding a report filter to exclude that entry from the report. You are correct that Data Studio won’t recognize empty fields when creating the data source.

Keep all row checkboxes & header row checkbox selected or checked by default in Angular-Slickgrid

I am using Angular SLickgrid and want to show all the checkboxes for all rows & also header row checkbox as selected by default (when grid loads). I am able to achieve it partly by using this.angularGrid.gridService.setSelectedRows(this.allDataId)
but I am getting errors in console and all data rows are not visible. I cannot use preset because I want to show all rows selected & till the time angular grid is loaded, I don't have all row IDs. Below is the error that I am getting. I have added null checks before passing data to setSelectedRows() but no use.
TypeError: Cannot read property 'children' of null
at ensureCellNodesInRowsCache (dist/data.bundle.js.gz:2692)
at getCellNode (dist/data.bundle.js.gz:2692)
at updateCellCssStylesOnRenderedRows (dist/data.bundle.js.gz:2692)
at setCellCssStyles (/dist/data.bundle.js.gz:2692)
at Event.handleSelectedRangesChanged (/dist/data.bundle.js.gz:2692)
at Event.notify (/dist/data.bundle.js.gz:2674)
at RowSelectionModel.p [as setSelectedRanges] (/dist/data.bundle.js.gz:2692)
at SlickGrid.setSelectedRows (/dist/data.bundle.js.gz:2692)
at SlickGrid.m (/dist/data.bundle.js.gz:2692)
at Event.notify (/dist/data.bundle.js.gz:2674)
Please suggest how to achieve it. Thanks.
The answer, if that is an acceptable one, is in your question. The SlickGrid Row Selection plugin is not meant to be all selected at first so you have to stick with using setSelectedRows and if you don't have all Ids at hand then call it when you do... and in case you're pushing data in chunk, then call setSelectedRows on each chunk. There's no magic here, you need to call it when you have the correct Ids

Cofoundry: How do I add a PageBlock inside a PageBlock?

I want to be able to build a site from the design view. Utilising Bootstrap, I want to be able to add rows, add columns to my rows and then add text and images etc. to inside those columns.
I though I could do this by making both "row" and "column" page blocks but if I do this I can't add anything inside the row or column page blocks once they're on the page (as they're not page templates).
The image below shows me adding a Row PageBlock to the introduction section in the Cofoundry CMS BasicTestSite starter theme provided by Cofoundry. But I can only add things below it, not inside it.
I know one option would be to add rows to the PageTemplate, but the limits the CMS to only being able to work with the number of rows on the page template. I want to be able to add rows and columns dynamically without touching code.
PS: I'm new to Cofundry, so apologies if I'm using this terminology incorrectly.
I think you should be able to use Nested Data Models to achevie this, whereby your row data model can have a nested collection of columns. However nested data models aren't associated with a template, and it is up to the container block type to know how to render your model.

Adding a column to an Acumatica grid

What is the best way to add a column to a grid in Acumatica? I've looked at the documentation, and I can't seem to find a way to do it.
Thanks
It depends on the type of grid you are using. As an example, lets say you are going to add a CreatedDate column to the details grid of Journal Transactions screen.
You will need to switch to design mode and open up the Aspx Control Tree and select the PXGrid node, click Add, and select Add Column to Grid to open the Add Grid Column dialog.
Find the field you want to add (in this case CreatedDateTime). you can also create new cusomt field here by pressing Add. Pick the correct Column Editor type (like DateTimeEdit) and press OK
move the Column up and down using the left tree to put in position you want.
Validate and publish the project!
If you want to modify existing grid which was created by Acumatica you'll need following steps:
1. Add field in DB ( optional )
2. Add filed description in DAC extension
3. Add column to page in customization engine, or manually imitate behavior of customization engine

smartgwt filter editor problem

i am using Listgrid of smartgwt api. i have set filter editor on the list grid using setShowFilterEditor(). On UI, i can filter out the text from the particular columns using filter editor which is shown on top of listgrid. till this, everything works fine. but problem starts after this. my ListGridRecords are of type ScreenInstanceGridRecord.
I cleared out the filter criteria before getting the ListGridRecord from the ListGrid using method clearCriteria(), so that i can save all the records to database ie. unfiltered records. when i try to get records from the listgrid using getRecordList(), 1000 Dummy records are added on the fly on first iteration, all my populated records are ignored . and i need here is records of ScreenInstanceGridRecord type. but on second iteration, i am getting my populated records which is of ScreenInstanceGridRecord type. why this problem is occurring. i should be getting ScreenInstanceGridRecord on the first iteration itself when i try to get records from the ListGrid using getRecordList(). i am getting no idea about this weird thing. any help from your side is most welcome.. plss
When you say you're getting 1000 Dummy records instead of your loaded records, in fact, your Records are not loaded yet at all. In this case, the ResultSet created by the ListGrid (see docs for ListGrid.fetchData()) is returning a provisional length (defaults to 1000) and returning the loading marker in lieu of Records (see ResultSet.rowIsLoaded()).
Use the DataArrived event to take action once data has been loaded. See ResultSet.lengthIsKnown() for how you can, in general, tell that data is not yet loaded.

Resources