row

How to copy a row of ANY table changing one column

I need to duplicate one row changing the PK. The table can be different in each client installation, so I can't just enumerate the columns. I've managed to do the following: INSERT INTO table SELECT * FROM table WHERE PK='value' but obviously it fails because I'm trying to duplicate the PK. Then I tried: INSER INTO table SELECT 'new...

Need to iterate through SQL table rows, one at a time (table too big to use adapter.Fill)

It's easy enough for me to read through a small SQL Server 2005 table like this: string cmdText = "select * from myTable"; SqlDataAdapter adapter = new SqlDataAdapter(cmdText, connection); DataTable table = new DataTable(); adapter.Fill(table); Unfortunately, this method appears to load the entire table into memory, which simply isn't...

How come jQuery can't remove this element?

I have a table like this: <table id='inventory_table'> <tr id='no_items_avail'> <td> There are no items in the database. </td> </tr> </table> And I want to get rid of it with jQuery like this: $('#inventory_table tbody tr#no_items_avail').remove(); However it doesn't seem to be working at all. What am I doing wro...

Why can't I fade out this table row in IE using jQuery?

I can't get the table row to fade out in IE. It works in Chrome, but not IE. It just becomes really 'light' and stays on the screen. I tried IE8 with and without compatibility mode. <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function hideIt() { $('#hideme').fadeTo("slow", ...

Get the row changed in repeater

Hey, I've got a repeater which is placed inside an updatepanel. When the user enters a new value, the repeater is updated without a postback. Is it possible to get the row that was updated in JQuery so that I can place an effect on it to make the change less subtle? For example, I'd like to fade a new color in on just the row that was...

Jquery alternate row color doesn't seem to work after hover function...

I use the following jquery statements, $(".resultsdiv:odd").css("background-color", "#fff"); $(".resultsdiv:even").css("background-color", "#EFF1F1"); $('.resultsdiv').hover(function() { $(this).css('background-color', '#f4f2f2'); }, function() { $(this).css('background-color', '#fff'); }); Alternate seems to be ok i...

C# : Filtering data of data table using select method

I have data table containing one column as FilePath. FilePath D:\New folder\link.txt D:\New folder\SharepointMigration(Work Schedule).xls D:\New folder\my2\link.txt D:\New folder\my2\SharepointMigration(Work Schedule).xls D:\New folder\my2\my3\New Text Document.txt D:\New folder\Try.txt I am filtering my data table b...

How do I retrieve row ID from an MVCContrib HTML Grid?

Hi, I currently have a product view page that contains an MVCContrib HTML Grid with a select link at the beginning of each row. If the select link is clicked, it takes me to a different page. My question is whether it is possible to retrieve the productID from the row that is selected and pass that to the next page. Maybe this is pos...

accessing the next tr from an input in the row above using jquery

Dear jquery experts, Is there any way to access a tr from an input of a tr above without adding row specific id's or classes? <table> <tr><td>just another row</td> <tr><td><input name="inputToSerachFrom" type="text" /></td><tr> <tr><td>I want to acces this row without adding id's or classes</td><tr> <tr><td>just another row</td> </tabl...

SQL: select random row from table where the ID of the row isn't in another table?

I've been looking at fast ways to select a random row from a table and have found the following site: http://74.125.77.132/search?q=cache:http://jan.kneschke.de/projects/mysql/order-by-rand/&amp;hl=en&amp;strip=1 What I want to do is to select a random url from my table 'urls' that I DON'T have in my other table 'urlinfo'.The query I am...

Table view with custom cell (programmatically)

Hey guys, So far, I used to create custom nibs to make my cell as I wanted but this time, the height of a cell will change from one to another so that I can't create a fixed-size cell's nib. So I decided to create it programmatically ... Is the way below the good way to achieve it ? // Customize the appearance of table view cells. - ...

PHP next MySQL row - how to move pointer until function checks true?

I have a PHP script which takes a value from a row in my MySQL database, runs it through a function, and if it determines it's true returns one value, and if it's false, it needs to go to the next value in the database and check that one until eventually one returns true. I think I need to use mysql_fetch_assoc, but I'm not really sure i...

How to add rows in middle of a table with jQuery?

I've a table which has customers names along with the products they purchased with their prices. So there are multiple records for each customer. This table is simple 3 column table : name, product and price. What I wanna do is: Put all records belonging to one customer together (I've done it) and just after these rows add one new extr...

UITableViewCell Custom accessory - get the row of accessory

Hi. I have a pretty big issue. I am trying to create a favorite-button on every UITableViewCell in a UITableView. That works very good, and I currently have an action and selector performed when pressed. accessory = [UIButton buttonWithType:UIButtonTypeCustom]; [accessory setImage:[UIImage imageNamed:@"star.png"] forState:UIControlStat...

Python In-memory table

What is the right way to forming in-memory table in python with direct lookups for rows and columns.I thought of using dict of dicts this way, class Table(dict): def __getitem__(self, key): if key not in self: self[key]={} return dict.__getitem__(self, key) table = Table() table['row1']['column1'] = 'val...

How to select row in ListView without a select button?

How can i select a entire row in a listview by clicking on a row instead of use a select button? ...

How to set alternate row color for an iterated table in php?

I am using php and i am iterating a table with a result array ... I want to add row color and alternate row color to it.... How to do so? Any suggestion... <table id="chkbox" cellpadding="0" cellspacing="2" width="100%" class="table_Style_Border"> <tr> <td style="width:150px" class="grid_header" align="center">RackName<...

How to change rows in a table based on other table rows in mysql?

I've a table which has 3 columns: id, a_id and b_id. Suppose rows are like this: 1, a1, b1 2, a1, b2 3, a1, b3 4, a2, b4 5, a2, b5 6, a2, b6 I want to convert it to 1, a1, b1 2, a1, b1 3, a1, b1 4, a2, b4 5, a2, b4 6, a2, b4 So I want to make all the b_id corresponding to a_id same, and equal to the one which is found first. How ...

Create a row of li's, give last one the classname "last" and put them all in an ul

Hi, how do I create a list of li's (they look like simple boxes by using css and float left) with the certain specifications: 7 li's in a row the row is a closed ul-tag at the end there should be 8 rows of ul's the last li (the 7th) should have the class="last". this is what i got so far, to create li's through an array (i need an...

How to get row count for jqGrid?

Hi, I would like to know how to get row count for jqGrid. I'm using rowNum: -1 so it displays all the rows. I tried using parseInt($("#grid").getGridParam("records"), 10) But it always returns 0. Thanks for the help. ...