TableSorter - How to ignore empty rows while doing sorting? - tablesorter

I have a GridView on which i have applied TableSorter (jquery Plugin). From server side i also add some empty rows in the grid (so when the items are too less it can still show some rows in the gridview). Whenever i click on any header for sorting, those complete empty rows also got sorted.Is there any way to ignore those empty rows so that the rows which have data (atleast in one cell) gets sorted not the empty ones?
Thanks,
Ashish

Related

How do I put Checkboxes in certain rows based on rows having imported data?

I am building a series of sheets with multiple tabs. Based on the imported data a tab could have 30 rows in one week and 35 in another week. I want to have checkboxes at the beginning of each row so I can select rows to be imported into another sheet based on boxes being checked or not checked. Is this possible or do I just need to add checkboxes to column A and just deal with them going into rows with nothing left in the column?
I was initially putting the checkboxes on the sheets that I was making with the Imported Datasheet. This was giving me checkboxes that went on infinitely after I had imported 20 - 30 items in a query. My solution was to put the checkboxes on the first sheet (nobody sees it but me) and then the only checkboxes on the query sheet were attached to the lines of data.

Formula missing when Adding Rows in Google Sheets

I have made a simple formula, based on cells in the same row, to indicate to the user that they have entered enough information - and it works as needed .
=IF(AND(ISTEXT(B20),ISNUMBER(C20),ISNUMBER(E20),ISTEXT(F20)),"Ok",IF(AND(ISBLANK(B20),ISBLANK(C20),ISBLANK(D20),ISBLANK(E20),ISBLANK(F20)),"","MORE INFO"))
However, when I click the built in "add more rows" button at the bottom of the sheet the formula is not present in the new cell - but any dropdown menu or validation I've used in the cells not containing the formula are present in the respective added cells of the new row. Any Ideas why just the formula is missing ? Thanks.
Thanks to GimelG at Google Docs Forum..........
When you add additional rows, Sheets assumes you want to continue the same dataset and, therefore, applies the existing formatting as well as Data Validation. It does not, however, copy formulas automatically as that would be adding actual new data to your sheet.
You can use an ArrayFormula version of your formula to populate the entire column, which it would continue to do as you'll add more rows of data. Assuming your data starts at row 2 (below the header), try this:
=arrayformula(if(istext(B2:B)*n(C2:C)*n(E2:E)*istext(F2:F),"Ok",if(len(B2:B)+len(C2:C)+len(D2:D)+len(E2:E)+len(F2:F),"MORE INFO",)))

Angular ui-grid - how to tell if I am on the last row

I'm using the latest version of Angular UI Grid and am struggling with how to determine if the focus is currently on the last displayed row of the grid.
The data array is not sorted the way it is on-screen, so I cannot use that info. I read that the visible row cache should be sorted as it is on-screen, but I think that might be related to the old ng-grid. At any rate, if I look at gridApi.core.getVisibleRows(myGrid) it still has the sorting as per the raw data.
I am currently handling the event gridApi.cellNav.on.navigate(newRowCol, oldRowCol). I can see the column and row that the user has the focus on, but I cannot see any values in this event (or elsewhere) that I can use to determine if the row is the last-displayed on-screen. I'd appreciate any tips!!
You should use gridApi.grid.renderContainers.body.visibleRowCache which is an array sorted the way the rows are visible on the screen. You can then check if the row is the last row with something like:
oldRowCol.row.uid == $scope.gridApi.grid.renderContainers.body.visibleRowCache[$scope.gridApi.grid.renderContainers.body.visibleRowCache.length-1].uid

Items to move up dynamically

If I have a a number of elements in one table column and I drag them one at a time to another column utilizing jQuery UI, how do I make remaining items in the first column move up, i.e. fill the gap left by the items that were moved. Assuming table cell valign="top".
I think it has to do something with DOM. It seems that even after I drag the item is it still in the same column.
You might want to use jquery ui's sortable instead.
http://jqueryui.com/demos/sortable/#connect-lists
You can connect lists and anything moved from one list will move the remaining elements to fill any gaps
However you are not giving us any code/markup to work with so I can only guess. Hope this helps!

How to sort a QuantumGrid on data from a different column

Is there a way to sort Devexpress QuantumGrid rows on data from a different column other than the one whose header has been clicked? For example, when the header of column A is clicked the rows of the grid are sorted on the data from column B. Visually it should still appear that it is column A that has been sorted as the sort glyphys will be shown in column A's header.
#norgepaul you must check the DevExpress Support Center for the questions related to the DevExress products, This site has thousands of answers and articles related to its products.
check theses links
Sorting by other field (when clicking header) in ExpressGrid 6
http://www.devexpress.com/Support/Center/SearchResults.aspx?searchtext=sort&p=T1|P0|83
I don't have DevExpress here to check, but i would look to see if there is a custom sort event. like OnCustomSort, where you get to decide whether a value or cell sorts higher or lower. I think you'll have the ability to know what rows are being compared, so you could look across to B cells, and make your own comparision.

Resources