Search Results

Search found 9542 results on 382 pages for 'row'.

Page 20/382 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Highlight the first row in a ListView and a ListBox Control

    - by Bill
    I am attempting to show both a ListView and ListBox on a Windows Form (C#). The difficulty I am having is in having the first row for both the ListView and ListBox highlighted when the application opens. Could someone please steer me in the right direction so that the first row of both the ListView and ListBox are highlighted when the application opens?

    Read the article

  • Manipulating row data with Javascript

    - by fivetwentysix
    I have a specific question, I have a link in a table in the third column of each row, when the user clicks that link he loads some ajax and updates the page, what I want to also happen is that in the 2nd column of the row where the link is, change the td's class from false to true, and the value from No to Yes. Thanks!

    Read the article

  • Jquery question : maintain focus upon appending a row?

    - by PoppySeedsAndAppleJuice
    The function below checks whether the id entered is already in the database, and if it is, then it adds some html to the table. I'm not sure if it's directly related to my issue or not, but, essentially, a user will place the focus on the id input field and enters an id. Using ajax, it posts to a php script and returns data if rows are found and nothing if it doesn't. If the user then tabs over to the next input field (zipcode), or clicks in another input field, they essentially have to do so twice. The cursor "flashes" in the field briefly and then focuses out. I tried adding in a focus(), but the behavior didn't change. So, the html looks like this: <table id="tableSearchData" class="searchlist" style="width: 789px;"> <thead> <tr> <th>ID</th> <th>Zip Code</th> <th>Radius (in miles)</th> </tr> </thead> <tbody> <tr class="odd"> <!-- PROBLEM is described below --> <!-- User clicks in <input name="id[]"> and ID is checked --> <!-- User presses "tab" or clicks in <input name="zipcode[] (in the *same* row) and cursor flashes, then goes out of focus so that the user has to click in the field again --> <td class="center sorting_1"><input type="text" value="" name="id[]"></td> <td class="center"><input type="text" value="" name="zipcode[]"></td> <td class="center"><input type="text" value="" name="radius[]"></td> </tr> </tbody> </table> Here's the jquery function... Like I said, I'm not sure if it's directly related to the problem I'm having, but, thought I should include it because I suppose it's likely there is something happening there... $("#tableSearchData > tbody > tr > td > input[name=id[]]").focusout(function() { var row = $(this).closest("tr").get(0); var sData = $(this).serialize(); $.ajax({ type: "POST", url: "checkid.php", data: sData, success: function(html) { $(row).replaceWith(html); $(".preset").each(function() { $(this).attr("disabled", true); }); $(row).closest("input[name=zipcode[]]").focus(); } }); });

    Read the article

  • How to get indexPath.row at textFieldDidEndEditing

    - by phx
    Hey all, i use some code for inline cell editing from Apples TaggedLocations Example and im now stuck. At the demo Code they save the changes at textFieldDidEndEditing, this works because they asume to edit only the first element in a table view. I have to edit every row at the table view, so my problem is how to get indexPath.row to update the correct object stored in a mutableArray. Or did i miss something? Thanks for your help!

    Read the article

  • SQL OUTER JOIN with NEWID to generate random data for each row

    - by CL4NCY
    Hi, I want to generate some test data so for each row in a table I want to insert 10 random rows in another, see below: INSERT INTO CarFeatures (carID, featureID) SELECT C.ID, F.ID FROM dbo.Cars AS C OUTER APPLY ( SELECT TOP 10 ID FROM dbo.Features ORDER BY NEWID() ) AS F Only trouble is this returns the same values for each row. How do I order them randomly?

    Read the article

  • Concatenate Row and Column names from Data.Frame

    - by user338714
    Is there a way to concatenate the row and column names from an existing data.frame into a new data frame. For example, I have column names of (A, B, C) and row names of (1, 2, 3) and I would like to combine these into a 3x3 matrix [A1, B1, C1; A2, B2, C2; A2, B2, C2]. Thanks for your help

    Read the article

  • I need a row Added event for a DataGridView

    - by tizzyfoe
    What i want to do is set the background of a row based on some criteria, but the datagrid will be fairly large so i don't want to have to loop over all the rows again. The rows get created me doing something like "myDataGridView.DataSource = MyDataSource, so the only way i can think to edit rows is by using an event. there is a row*s* added event, but that gives me a list of rows that i'd have to iterate over. Thanks in advance for any help.

    Read the article

  • insertion in the same row for all activities

    - by Utman Alami
    i am here to ask for help again, i created one database for all activities, the problem i have is that the insertion in every activity comes in with new row, but that's not what i want, what i am looking for is in the same row in each activity insert the columns that contains. i already looked for solution here, they are speaking about static reference but i don't know how to do it! so, is there any ideas ? static DBAdapter db = new DBAdapter();

    Read the article

  • Get data from selected row in Gridview in C#, WPF

    - by Will
    Hi, I am trying to retrieve data from a Gridview that I have created in XAML. <ListView Name="chartListView" selectionChanged="chartListView_SelectionChanged"> <ListView.View> <GridView> <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" Width="250"/> <GridViewColumn Header="Type" DisplayMemberBinding="{Binding Type}" Width="60"/> <GridViewColumn Header="ID" DisplayMemberBinding="{Binding ID}" Width="100"/> </GridView> </ListView.View> </ListView> I have seen some code like this :- GridViewRow row = GridView1.SelectedRow; TextBox2.Text = row.Cells[2].Text; However my problem is that my GridView is created in XAML, and is not named, ie I cannot (or do not know how to) create a reference to 'gridview1', and therefore cannot access objects within it. Can I name or create a reference to my gridview either from c# or XAML so I can use the above code? Secondly, can I then access the array elements by name instead of index, something like :- TextBox2.Text = row.Cells["ID"].Text Thanks for any help.

    Read the article

  • consistency of Trigger Procedure (before row trigger) Postgresql

    - by elgcom
    Using Postgresql. I try to use TRIGGER procedure to make some consistency check on INSERT. The question is ...... whether "BEFORE INSERT FOR EACH ROW" can make sure each row to insert "checked" and "inserted" one after another? do I need extra lock on table to survive from concurrent insert? check for new row1 - insert row1 - check for new row2 - insert row2 -- -- -- unexpired product name is unique. CREATE TABLE product ( "name" VARCHAR(100) NOT NULL, "expired" BOOLEAN NOT NULL ); CREATE OR REPLACE FUNCTION check_consistency() RETURNS TRIGGER AS $$ BEGIN IF EXISTS (SELECT * FROM product WHERE name=NEW.name AND expired='false') THEN RAISE EXCEPTION 'duplicated!!!'; END IF; RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER trigger_check_consistency BEFORE INSERT ON product FOR EACH ROW EXECUTE PROCEDURE check_consistency(); -- INSERT INTO product VALUES("prod1", true); INSERT INTO product VALUES("prod1", false); INSERT INTO product VALUES("prod1", false); // exception! this is OK name | expired ============== p1 | true p1 | true p1 | false This is not OK name | expired ============== p1 | true p1 | false p1 | false or maybe I should ask, how can I use Trigger to implement "Primary" or "Unique" constraint-like SQL.

    Read the article

  • how to atomically claim a row or resource using UPDATE in mysql

    - by Igor
    i have a table of resources (lets say cars) which i want to claim atomically. if there's a limit of one resource per one user, i can do the following trick: UPDATE cars SET user = 'bob' WHERE user IS NULL LIMIT 1 SELECT * FROM cars WHERE user IS bob that way, i claim the resource atomically and then i can see which row i just claimed. this doesn't work when 'bob' can claim multiple cars. i realize i can get a list of cars already claimed by bob, claim another one, and then SELECT again to see what's changed, but that feels hackish. What I'm wondering is, is there some way to see which rows i just updated with my last UPDATE? failing that, is there some other trick to atomically claiming a row? i really want to avoid using SERIALIZABLE isolation level. If I do something like this: 1 SELECT id FROM cars WHERE user IS NULL 2 <here, my PHP or whatever picks a car id> 3 UPDATE cars SET user = 'bob' WHERE id = <the one i picked> would REPEATABLE READ be sufficient here? in other words, could i be guaranteed that some other transactions won't claim the row my software has picked during step 2?

    Read the article

  • how to select just a row of table using jquery

    - by user1400
    hello i have created a table on my application same follwing code <table class="spreadsheet"> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> <tr> <td>5</td> <td>6</td> </tr> </table> i select a row by click with following jquery code $("tr").click(function(){ $(this).toggleClass("otherstyle"); } and my css is tr.otherstyle td { background-color: #d1db3e; color:#000; } i would like when i click on a row, other rows be unselected and just one row be selected how we could create this? thanks

    Read the article

  • How do I edit a row in NSTableView to allow deleting the data in that row and replacing with new d

    - by lampShade
    I'm building a to-do-list application and I want to be able to edit the entries in the table and replace them with new entries. I'm close to being able to do what I want but not quit. Here is my code so far: /* IBOutlet NSTextField *textField; IBOutlet NSTabView *tableView; IBOutlet NSButton *button; NSMutableArray *myArray; */ #import "AppController.h" @implementation AppController -(IBAction)addNewItem:(id)sender { [myArray addObject:[textField stringValue]]; [tableView reloadData]; } - (int)numberOfRowsInTableView:(NSTableView *)aTableView { return [myArray count]; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { return [myArray objectAtIndex:rowIndex]; } - (id)init { [super init]; myArray = [[NSMutableArray alloc] init]; return self; } -(IBAction)removeItem:(id)sender { NSLog(@"This is the index of the selected row: %d",[tableView selectedRow]); NSLog(@"the clicked row is %d",[tableView clickedRow]); [myArray replaceObjectAtIndex:[tableView selectedRow] withObject:[textField stringValue]]; [myArray addObject:[textField stringValue]]; //[tableView reloadData]; } @end

    Read the article

  • code igniter codeigniter question, making anchor load page containing data from referenced row in DB

    - by thrice801
    Hi, Im trying to learn the code igniter library and object oriented php in general and have a question. Ok so Ive gotten as far as making a page which loads all of the rows from my database and in there, Im echoing an anchor tag which is a link to the following structure. [code]echo anchor("videos/video/$row-video_id", $row-video_title);[/code] So, I have a class called Videos which extends the controller, within that class there is index and video, which is being called correctly (when you click on the video title, it sends you to videos/video/5 for example, 5 being the primary key of the table im working with. So basically all Im trying to do is pass that 5 back to the controller, and then have the particular video page output the particular rows data from the videos table. My function in my controller for video looks like this - [code] function video() { $data['main_content'] = 'video'; $data['video_title'] = 'test'; $this-load-view('includes/template', $data); } [/code] So ya, basically test should be instead of test, a returned value of a query which says get in the table "videos", the row with the video_id of "5", and make $data['video_title'] = value of video_title in database... Should have this figured out by now but dont, any help would be appreciated!

    Read the article

  • Three20 TTSectionedDataSource row height

    - by Ward
    Hey there, I'm using Three20 to create a table with several textfields for user registration. I've found two possible methods using Three20. The first uses the TTSectionedDataSource's tableDidLoadModel method to manually add UI components and the second adds custom items that contains pre formatted UI components. The second option seems way more complex and I'm having a difficult time accessing the individual fields. So if one field is a textfield for the username, I need to access the field to submit the username and it doesn't seem like there's an easy answer. The first option gives me a lot of flexibility, but I can't figure out how to set the individual row heights. One row may have a label above a text field, another may have an image, etc. Is there a method that can be used in TTSectionedDataSource that will allow me to set the height for each row? Thus far, I'm using method one and creating UIViews to hold a label field and a text field. I've tried changing the frame of the uiview before it is added to the items array, but it has no affect. Any ideas?

    Read the article

  • Collapsing data frame by selecing one row per group

    - by jkebinger
    I'm trying to collapse a data frame by removing all but one row from each group of rows with identical values in a particular column. In other words, the first row from each group. For example, I'd like to convert this > d = data.frame(x=c(1,1,2,4),y=c(10,11,12,13),z=c(20,19,18,17)) > d x y z 1 1 10 20 2 1 11 19 3 2 12 18 4 4 13 17 Into this: x y z 1 1 11 19 2 2 12 18 3 4 13 17 I'm using aggregate to do this currently, but the performance is unacceptable with more data: > d.ordered = d[order(-d$y),] > aggregate(d.ordered,by=list(key=d.ordered$x),FUN=function(x){x[1]}) I've tried split/unsplit with the same function argument as here, but unsplit complains about duplicate row numbers. Is rle a possibility? Is there an R idiom to convert rle's length vector into the indices of the rows that start each run, which I can then use to pluck those rows out of the data frame?

    Read the article

  • Naive Bayes matlab, row classification

    - by Jungle Boogie
    How do you classify a row of seperate cells in matlab? Atm I can classify single coloums like so: training = [1;0;-1;-2;4;0;1]; % this is the sample data. target_class = ['posi';'zero';'negi';'negi';'posi';'zero';'posi']; % target_class are the different target classes for the training data; here 'positive' and 'negetive' are the two classes for the given training data % Training and Testing the classifier (between positive and negative) test = 10*randn(25, 1); % this is for testing. I am generating random numbers. class = classify(test,training, target_class, 'diaglinear') % This command classifies the test data depening on the given training data using a Naive Bayes classifier Unlike the above im looking at wanting to classify: A B C Row A | 1 | 1 | 1 = a house Row B | 1 | 2 | 1 = a garden Can anyone help? Here is a code example from matlabs site: nb = NaiveBayes.fit(training, class) nb = NaiveBayes.fit(..., 'param1',val1, 'param2',val2, ...) I dont understand what param1 is or what val1 etc should be?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >