How to update the data of slickgrid on row change? - row

I want to update the slickgrid on everyrowchange in the sense after making the changes in entire row i want event to fire update.
Can anybody suggest please?

SlickGrid has no concept of editing a row, only editing individual cells. If the user edits several cells in a row, how would you decide when the edit to the whole row is complete?
If you consider the row complete when the last column is edited, you can set an event handler on cell edit for the last column and react appropriately.

You could keep an array of "Dirty Row IDs".
Then when the selected row changes, loop through your array of Dirty Row IDs and do your thing.

Related

How do I move a row of a table in DOORS?

Problem
I have data in one row of a DOORs table that I need to move to another location in a table. I know of shift-clicking, but all this does is move the whole table:
You can copy or move tables within a module or between modules using drag-and-drop. To copy or move a table using drag-and-drop, click any cell in the table. The whole table is moved when you drag-and-drop the table cell.
Question
Other than the following 2 methods:
Copy-pasting the data between the row I want to move from and the row I want to move to.
Undoing my actions and recreating the row where I want it.
Is there a way in DOORs to move a row to a different location in the same table of origin?
I'm going to say 'no'.
Without the ability to run a DXL script, I don't think there is a way in DOORS to do what you are asking.
Sorry.

Table Widget Needed

I have a requirement to build a table widget for sitecore 8 update 5. They should be able to choose the number of columns from 1 to 6 and then edit the content of the table in experience editor.
I know tables can be created using the rich text editor but they really want this widget.
Finally my question is being new to sitecore what would be the recommended approach in building this widget? Keeping in mind they want to be able to choose the number of columns between 1 to 6 and with as many rows as they want and edit in experience editor.
I have done this in the past by using a hierarchy of child items. The data source for your Table rendering may have a field for a header or styles and its children define the rows. Rows have children to define cells. You can use edit frames with insert, delete and move up/down buttons for both rows and cells. If you need to limit columns to 6 or fewer, you may need to implement a custom button rather than use the standard insert button. The cells can then have whatever fields you need or dynamic placeholders.

Highlight entire row of a QTableWidget

I want to highlight the entire row of a my QTableWidget when I click on one cell of this row.
I already put a connection between an activation of my cell and my function highlightRow :
QObject::connect(ui->variableTableWidget,SIGNAL(cellActivated(int,int)), this, SLOT(highlightRow()));
Now I have to write my function, but I don't know how could I know which cell is activated.
Is there a function in the QTableWidget that is suppose to return all activated cell ?
Call this on your table widget when it is created
setSelectionBehavior(QAbstractItemView::SelectRows);
this will make it so that when you click on a cell that row is selected

Change row color from cell value in google visualization table

I have a google visualization table with some numerical and some non numerical columns. I need a JavaScript function that will change the color of the whole google visualization row based on the value of a cell in the row.
I am already able to change the color of the numerical cell using the colorformater but I need to also change the color of the remaining cells of the row.
Hey I just had the same problem as you and I was able to hack together a response. I'm sure there is a better way to do this, but it works for me.
Use the data.setProperty tag and you can do that for each column of the row you are working on. So if you know the row number, which I assume you do since you can do it for just the one column using the colorformater, you can do this easily.
dataTable.setProperty(0, 0, 'style', 'background-color: red;');
dataTable.setProperty(0, 1, 'style', 'background-color: red;');
The first parameter is the row index, so that should stay constant, and the next parameter is the column index, so just loop this through all of your columns. And then you should be able to change the background-color to any css style.
Hope that helps!
You should set the datatable allowHtml=true.

How to add rows that include formula in spreadsheet?

I am working with a spreadsheet in OpenOffice. This spreadsheet already has the
formulas for each row. I need to add additional rows to this spreadsheet, but don't
know how to do so in order that it copys the formula but applies it to that row.
For example, each row has 8 columns (A-H), and there are formulas in D,F,G,and H. The formulas apply to each row, for example the last row on the sheet is the 6th row, so the formulas read like: =+B6*C6, =+E6*B6, etc.
Lets say I need to add a 7th row that utilizes the same formulas, but don't want to have to manually enter it for each new row so that it applies (for example: =+B7*C7, etc) How would I accomplish this?
Normal copy and paste will do that. That's the beauty of a spreadsheet. Although the formula looks like it says "B6" it is actually stored internally as something like "three cells to the left" so when you copy it to the row below, it is still "three cells to the left" only it appears as B7.
You can also select (click) the cell with the formula, then drag the little black square in the bottom right hand corner of your selection, down to repeat however many times you need it to.
I found a way.
Select the entire row (clicking on the row number), hold Ctrl+Alt and drag the row to the line below. It will copy+insert the row.
You can also copy the entire row and "paste special" (Ctrl+Shift+V) selecting the option to shift the cells down
I just didn't find a way to insert many rows at once with the data.
(I now it´s an old post, but it´s to help people looking on Google)
Excel tables auto fill formulas as new rows are added.
As easy as it sounds to copy/fill formulas down, it is usually beyond a users ability to either comprehend or remember to do the fill. OpenOffice/libre office, etc., needs to be able to do so.
Although new rows with copied formulas can be inserted anywhere for any reason, these instructions assume that you have spreadsheet with many data rows. And above is/are header rows. And below is/are total rows. And it is your desire to add a row to the bottom of the data rows (immediately above the total rows) and that the data rows contain formulas you would like to copy. And the new data row is to applied to the total below.
The first time you do it... not so easy... After that... two clicks...
Select the row with the formulas by clicking the row number (the last data row).
Copy the row (Ctrl+C).
Press the down arrow (now on footer row possibly containing summation formulas).
Begin a special paste operation (Ctrl+Shift+V).
Change the "selection" check marks so that only "Formulas" is selected.
Chose "Down" in "Shift Cells".
Hit "OK" (or press Return) to inset the row.
Edit the summation formula (F2) and make sure the summation range is still correct. If it is not, then you can manually fix the range, but you really need to change the following LibreOffice setting:
Choose menu option "Tools" (Alt-T).
Choose "Options" (O) in the "Tools" menu.
Expand "LibreOffice Calc" (Hit the disclosure triangle there).
Select "General" in the "LibreOffice Calc" expansion list.
Put a checkmark in (click) the "Expand references when new columns/rows are inserted"
Now that you have the row in the copy buffer and proper setup is complete, you only need to be on the first footer row, press Ctrl+Shift+V and hit Return.