rows

Alternate row coloring in jquery

Hi, I have a table with expand and collapse of rows, with column sortable. Below is my code, is there is any ways to improve its performance. And read appending complete group of rows into dom improves performance, but if i do out of $.each() loop it throws error. teble demo var alt = true; var altSub = true; $.each(myData, function(...

Adding rows to wpf datagrid

Hi all, I need to select a set of rows from one wpf toolkit datagrid and want to add it in another wpf toolkit datagrid. The code I used is as follows: foreach(DataRowView row in MyFirstDataGrid.SelectedItems) { MySecondDataGrid.Items.Add(row); } But the problem here is, it just adds empty rows in the second datagrid without any co...

PHP and MYSQL SHOW 5 Rows

How do you get php to show 5 rows from mysql Then create a new line and show another 5 ect.... Thank you ...

DataGridView row repositioning

Is there a simple way to swap the position of two rows in an unbound DataGridView? I am using it to display an ordered list, where I want the up/down arrow keys to shuffle a row up and down the grid, but I can't see any way to reposition a row within the grid without completely repopulating it, which seems excessive. The Index value ...

how to make cells invisible without moving others in a row

Hi, I'm trying to add a cell to a row but making other cells not visible moves the cell down in order. For example: var celltwo = row.insertCell(0); var cellthr = row.insertCell(0); var cellfr = row.insertCell(0); var cellfv = row.insertCell(0); var cell = row.insertCell(4); celltwo.style.display = ...

What is the tried and true way of counting the number of rows returned from PHP `mysql_query` function?

I know about mysql_num_rows ( resource $result ) but I have read somewhere that is it not 100% accurate. I have seen other alternatives that actually gets each row and run a counter but that sounds pretty inefficient. I am interested in seeing what others do to get an accurate and efficient count. ...

DataGridView (VB.net) problems, nonvisible rows are still visible and the DataGridView is empty despite having a DataSource

I have several problems with rows in a DataGridView. Background information: The DataGridView (DataGridViewCalib) is in one TabPage of a TabControl, some columns of the DataGridView are automatically DataGridViewCheckBoxColumn as the DataSource have some colums which are Boolean. This is a Windows Form written in VB.Net with Visual Stu...

"Pivot" a table in Excel

I've got a large set of data in Excel 2007, but the rows should have been columns, and vice-versa. Is there a simply way to "pivot" this spreadsheet, rearranging all cells so that the rows become the columns? ...

mysql query with group by and order by

I have a table like this: .--------------------------------. | Name | XX | Date | .--------------------------------. | N1 | 5 | 2009-05-01 | | N1 | 10 | 2008-01-08 | | N2 | 8 | 2009-02-02 | .________________________________. My result should be this: .------------. | Name | XX | .-------...

jQuery removing columns and rows..

Hi all, I've got a table which I'm pulling in from an external website, but I need to be able to hide the first 2 columns, add a class to the 3rd column, add a class to the 6th row and delete the 7th row. I've managed to do the columns, but I'm having problems with the rows.. I'm using the following code to hide the first 2 columns and ...

CSS: how do I create a gap between rows in a table?

Meaning making the resultant table look less like this: [===ROW===] [===ROW===] [===ROW===] [===ROW===] ... and more like this: [===ROW===] [===ROW===] [===ROW===] [===ROW===] I tried adding margin-bottom:1em; to both td and tr but got nothing. Any ideas? ...

IEqualityComparer GethashCode method

Hi, My datatable contains the following columns... resultsView.Columns.Add("Fam.", typeof(string)); resultsView.Columns.Add("Component", typeof(int)); resultsView.Columns.Add("Description", typeof(string)); resultsView.Columns.Add("Quantity", typeof(double)); resultsView.Columns.Add("Unit", typeof(string)); resu...

Need to pull last x number of rows based on date.

I have a table with dates in "Aug 23, 2009" format and 5 values, so that it looks like this SELECT * FROM table; Date | Total | V1 | V2 | V3 | V4 Aug 21, 2009 | 41 | 23 | 8 | 8 | 2 Aug 22, 2009 | 39 | 22 | 8 | 7 | 2 Aug 23, 2009 | 35 | 20 | 6 | 7 | 2 Aug 24, 2009 | 34 | 20 | 6 | 6 | 2 Aug 25, 2009 | 32 ...

powershell difference between rows

Hi, text file has contents of 3 and 5. How do i write powershell oneliner to substract 5 -3 How do i proceed after using gc gc test.txt | %{$_}.. Any help is appreciated. ...

how to get number of rows using SqlDataReader in C#

Hi, my question is about how to get number of rows using SqlDataReader in C#. I've seen some answers around the net about this but none were clearly defined except for one that states to do a while loop with Read() method and increment a counter. My problem is that I am trying to fill a multi-dimensional array with the first row being t...

How do I get the number of rows in my gridview control?

The rows.count property only tells me how many rows are displayed on the screen, not the total number available. The solution below is not working. I have an SqlDataSource and a GridView and neither can be cast into a dataset or datatable. ...

Hide rows in postgres

I have decided that instead of deleting rows from a postgres database, i rather hide the rows so that in case the rows were deleted by accident, i can still retrieve them. What is the best approach to hide rows from a database? Do you recommend creating a column named "Active" and giving it a value of either 1 or 0, 1 meaning active and ...

Renaming rows and columns in R

I'm running the following script: cause = c(1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2); time = c(1, 1, 2, 3, 3, 2, 2, 1, 1, 2, 2); table(cause, time) And I get the following:           time cause 1 2 3        1 2 2 2        2 2 3 0 What I want is this:                time      cause 1 2 3   Maltreat 2 2 2 Non-Maltr 2 3 0 So, my questi...

DataTable Rows.IndexOf()

I am trying to find a row and then delete that row from a datatable. I keep getting nIndex = -1. Anyone have suggestions? protected void cbxSelected_CheckedChanged(object sender, EventArgs e) { CheckBox checkbox = (CheckBox)sender; GridViewRow row = (GridViewRow)checkbox.NamingContainer; string sSampleId = row.Cells[1].Text; if (!s...

Does mysql_num_rows recount all the rows, or does it just grab a total after a select statement?

I wasn't sure if it recounted the rows, or if after it retrieved the whole result set, it only grabbed the total post query? ...