Search Results

Search found 1829 results on 74 pages for 'cells'.

Page 7/74 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • VBA code to hide or unhide rows based on a cell value

    - by I AM L
    Heres my code, but its not really doing anything, I dont see anything wrong with it: Private Sub PG1(ByVal Target As Range) If .Range("E50").Value = "Passed" Then Rows("51").EntireRow.Hidden = True End If ElseIf Range("E50").Value = "Failed" Then Rows("51").EntireRow.Hidden = True End If End Sub My intention is that when that specific cell in the previous row is set to "Passed" from the dropdown, then the below row would appear, if its a 'Failed" then it'll be hidden instead.

    Read the article

  • datagridview apply cellstyle to cells

    - by SchlaWiener
    I used this example to create a DateTime column for a DataGridView in my winforms app. http://msdn.microsoft.com/en-us/library/7tas5c80.aspx I can see the new column in the Windows Forms Designer and add it to an existing DataGridView. However, I want to be able to change the display format when I change the "DefaultCellStyle" within the designer. The designer generated code looks like this: DataGridViewCellStyle1.Format = "t" DataGridViewCellStyle1.NullValue = Nothing Me.colDate.DefaultCellStyle = DataGridViewCellStyle1 Me.colDatum.Name = "colDate" Me.colDatum.Resizable = System.Windows.Forms.DataGridViewTriState.[False] Which is fine. But since the code of the DataGridViewCalendarCell does this in the constructor: Public Sub New() Me.Style.Format = "d" End Sub The format never changes to "t" (time format). I didn't find out how to apply the format from the owning column to I use this woraround atm: Public Overrides Function GetInheritedStyle _ (ByVal inheritedCellStyle As _ System.Windows.Forms.DataGridViewCellStyle, _ ByVal rowIndex As Integer, ByVal includeColors As Boolean) _ As System.Windows.Forms.DataGridViewCellStyle If Me.OwningColumn IsNot Nothing Then Me.Style.Format = Me.OwningColumn.DefaultCellStyle.Format End If Return MyBase.GetInheritedStyle(_ inheritedCellStyle, rowIndex, includeColors) End Function However, since this is just an hack I want to know which is the "how it should" be done way to apply the default cellstyle from a DataGridViewColumn to its cells. Any suggestions?

    Read the article

  • Finding column index using jQuery when table contains column-spanning cells

    - by Brant Bobby
    Using jQuery, how can I find the column index of an arbitrary table cell in the example table below, such that cells spanning multiple columns have multiple indexes? HTML <table> <tbody> <tr> <td>One</td> <td>Two</td> <td id="example1">Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </tr> <tr> <td colspan="2">One</td> <td colspan="2">Two</td> <td colspan="2" id="example2">Three</td> </tr> <tr> <td>One</td> <td>Two</td> <td>Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </tr> </tbody> </table> jQuery var cell = $("#example1"); var example1ColIndex = cell.parent("tr").children().index(cell); // == 2. This is fine. cell = $("#example2"); var example2ColumnIndex = cell.parent("tr").children().index(cell); // == 2. It should be 4 (or 5, but I only need the lowest). How can I do this?

    Read the article

  • take values from table cells and turn into array

    - by liz
    using jquery I need to retrieve an array from table cells, format the data and pass it into a js function. the code i am using is this: var l1 = new Array(); $('table#datatable tbody td:first-child').each(function() { l1.push($(this).text()); }); this is the table fragment <tr> <th scope="row">Age: 0-4</th> <td>0</td> <td>9.7</td> </tr> <tr> <th scope="row">5-17</th> <td>23.6</td> <td>18.0</td> </tr> <tr> <th scope="row">Total 0-17</th> <td>20.6</td> <td>16.1</td> </tr> the table's id is "datatable". i want to return an array of the contents of each first td and then format it like this: 0,23.6,20.6 i am very new to using arrays...

    Read the article

  • JQuery collapse table cells based on class

    - by H4mm3rHead
    Hi i have a table strcture for my menu, and i need to be able to collapse/expand the menu from level2, so that all level3 cells becone visible. My HTML is like this: <table> <tr><td class="level1"><a href="abc.html">First Item</a></td></tr> <tr><td class="level2"><a href="def.html">SecondItem</a></td></tr> <tr><td class="level3"><a href="ghi.html">Third Item</a></td></tr> <tr><td class="level3"><a href="jkl.html">Fourth Item</a></td></tr> <tr><td class="level3"><a href="mno.html">Fifth Item</a></td></tr> <tr><td class="level2"><a href="pqr.html">Sixth Item</a></td></tr> <tr><td class="level2"><a href="stu.html">Seventh Item</a></td></tr> </table> How do i, when i press the level2 item i only collapse/expand the level3 items following the level2 i pushed? I only want to do this for level2, not for level 1.

    Read the article

  • how to prevent divs from overlapping when using no-wrap across table cells

    - by pedalpete
    I'm trying to create an events calendar which has a somewhat 'gantt' chart like bar representing the times of an event, along with the time listed. I've uploaded a page showing the problem As you can see, the problem is that in the 3rd cell, the event div is being overlapped by the previous event div which goes outside the boundary of the cell. The event from the 2nd cell SHOULD expand beyond the cell border, but what I'm trying to get to happen is that WHEN the event from the 2nd cell expands into the 3rd cell, the event on the 3rd cell starts a new line. I believe the problem exists because of the nowrap on the time, but I want the time and in some cases the bar to cross the cell boundary when the time goes from one day to another. All that works now, but I'm having a problem with events overlapping when an event goes from one day to another. I've tried all sorts of :even cells having a different padding, etc. but all these solutions seem to bring up more problems. Is there a way get the no-wrap to force a new long when it crosses into the next cell? or any other solution to this issue?

    Read the article

  • "reset" cells after changing orientation

    - by Christian
    Hi, I added the interfaceOrientation to my app. It works fine concerning the views. Some of the table-cells I defined by CGRects to position the text in the cell. In portrait-mode the cell is 300px long, in landscape-mode 420px. I use the following code to change the CGRects depending the orientation: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.interfaceOrientation == UIDeviceOrientationPortrait) { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 300, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]initWithFrame:keyLabelRect]; keyLabel.tag = 100;......... } else { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 450, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]..... My problem is, when the table is visible and the orientation is changed, I need to scroll to see the new "layout". How can I manage to "reload" the view after changing the orientation?

    Read the article

  • HTML table cells not properly aligned

    - by Yuval A
    I have the following HTML table: <table style="width: 100%;"> <tr> <td class="title_bar_left_border"></td> <td class="title_bar_middle"></td> <td class="title_bar_right_border"></td> </tr> </table> With the following css rules: .title_bar_left_border { BACKGROUND-IMAGE: url(tray_left.gif); WIDTH: 3px; HEIGHT: 24px; } .title_bar_right_border { BACKGROUND-IMAGE: url(tray_right.gif); WIDTH: 3px; HEIGHT: 24px; } .title_bar_middle { BACKGROUND-IMAGE: url(tray_middle.gif); WIDTH: 100%; BACKGROUND-REPEAT: repeat-x; HEIGHT: 24px; } Any idea why this is the result? Instead of getting a nice table header with rounded corners you get this weird gap between the cells. Where are the gaps coming from? Besides fixing this ugly issue, I would like to understand the rationale as to why all browsers render the HTML this way.

    Read the article

  • Updating Cells in a DataTable

    - by Maxim Z.
    I'm writing a small app to do a little processing on some cells in a CSV file I have. I've figured out how to read and write CSV files with a library I found online, but I'm having trouble: the library parses CSV files into a DataTable, but, when I try to change a cell of the table, it isn't saving the change in the table! Below is the code in question. I've separated the process into multiple variables and renamed some of the things to make it easier to debug for this question. Code Inside the loop: string debug1 = readIn.Rows[i].ItemArray[numColumnToCopyTo].ToString(); string debug2 = readIn.Rows[i].ItemArray[numColumnToCopyTo].ToString().Trim(); string debug3 = readIn.Rows[i].ItemArray[numColumnToCopyFrom].ToString().Trim(); string towrite = debug2 + ", " + debug3; readIn.Rows[i].ItemArray[numColumnToCopyTo] = (object)towrite; After the loop: readIn.AcceptChanges(); When I debug my code, I see that towrite is being formed correctly and everything's OK, except that the row isn't updated: why isn't it working? I have a feeling that I'm making a simple mistake here: the last time I worked with DataTables (quite a long time ago), I had similar problems. If you're wondering why I'm adding another comma in towrite, it's because I'm combining a street address field with a zip code field - I hope that's not messing anything up. My code is kind of messy, as I'm only trying to edit one file to make a small fix, so sorry.

    Read the article

  • How to get two TD cells side by side WITHOUT using css

    - by Joe
    Hi, in the following HTML snippet, I would like the two cells be placed side by side with NO spaces between them; without using css if possible. If the leftmost position of the 2nd one is the rightmost position of the 1st, why WOULD they have any space between? thx. <TR> <TD style="position:absolute; top:98px; left:0px; right:56px; bottom:126px; font-size: 7pt; background-color:Lime; text-align: center; font-family: Arial;" cellpadding="0" cellspacing="0">ABC</TD> <TD style="position:absolute; top:98px; left:56px; right:112px; bottom:126px; font-size: 7pt; background-color:Lime; text-align: center; font-family: Arial;" cellpadding="0" cellspacing="0">123</TD>

    Read the article

  • Set the background color for a fixed range of cells

    - by Count Boxer
    I have VBA code in an Excel spreadsheet. It is used to set the font and background color of a cell based on the value in that cell. I am doing it in VBA instead of "Conditional Formatting" because I have more than 3 conditions. The code is: Private Sub Worksheet_Change(ByVal Target As Range) Dim c As Range, d As Range, fc As Long, bc As Long, bf As Boolean Set d = Intersect(Range("A:K"), Target) If d Is Nothing Then Exit Sub For Each c In d If c >= Date And c <= Date + 5 Then fc = 2: fb = True: bc = 3 Else Select Case c Case "ABC" fc = 2: fb = True: bc = 5 Case 1, 3, 5, 7 fc = 2: fb = True: bc = 1 Case "D", "E", "F" fc = 2: fb = True: bc = 10 Case "1/1/2009" fc = 2: fb = True: bc = 45 Case "Long string" fc = 3: fb = True: bc = 1 Case Else fc = 1: fb = False: bc = xlNone End Select End If c.Font.ColorIndex = fc c.Font.Bold = fb c.Interior.ColorIndex = bc c.Range("A1:D1").Interior.ColorIndex = bc Next End Sub The problem is in the "c.Range" line. It always uses the current cell as "A" and then goes four cells to the right. I want it to start in the "real" cell "A" of the current row and go to the "real" cell "D" of the current row. Basically, I want a fixed range and not a dynamic one.

    Read the article

  • Reload a UITable on the fly when editing a UITextField inside one of the cells

    - by Saze
    I have a UITable containing some customs UITableCells. Those cells contain a few UILabels and a UITextField. The datasource of the table comes from a main controller's property. (This controller is also the delegate and the dataSource for the table). Here's a simplified screenshot of the UI: Now, I need to update "on the fly" the content of all the UILabels when the user edits one of the UITextFields. To do so, at the I am listening to the "Editing Changed" event at the UITextField level. This triggers the following action: - (IBAction) editChangeHandler: (id) sender { MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [[delegate.viewController.myDataSourceArray objectAtIndex:self.rowIndex] setANumber: [theTextField.text intValue]]; [delegate.viewController reloadRows]; } The reloadRows method in the viewController is as such: - (void) reloadRows { NSLog(@"called reloadRows"); //perform some calculations on the data source objects here... [theUITable reloadData]; } My problem here is that whenever the user changes the value in the field, the reloadRows method is successfully called, so is apparently the reloadData but it also causes the keyboard to be dismissed. So in the end, the user can only touch one key when editing the TextField before the keyboard is dismissed and the table reloaded. Does anybody knows a solution to this or have experienced the same issue?

    Read the article

  • cant populate cells with an array when i have loaded a second UITableViewController

    - by richard Stephenson
    hi there, im very new to iphone programming, im creating my first app, (a world cup one) the first view is a table view. the cell text label is filled with an array, so it shows all the groups (group a, B, c,ect) then when you select a group, it pulls on another UITableViewcontroller, but whatever i do i cant set the text label of the cells (e.g france,mexico,south africa, etc. infact nothin i do to the cellForRowAtIndexPath makes a difference , could someone tell me what im doing wrong please Thanks `here is my code for the view controller #import "GroupADetailViewController.h" @implementation GroupADetailViewController @synthesize groupLabel = _groupLabel; @synthesize groupADetail = _groupADetail; @synthesize teamsInGroupA; #pragma mark Memory management - (void)dealloc { [_groupADetail release]; [_groupLabel release]; [super dealloc]; } #pragma mark View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // Set the number label to show the number data teamsInGroupA = [[NSArray alloc]initWithObjects:@"France",@"Mexico",@"Uruguay",@"South Africa",nil]; NSLog(@"loaded"); // Set the title to also show the number data [[self navigationItem]setTitle:@"Group A"]; //[[self navigationItem]cell.textLabel.text:@"test"]; //[[self navigationItem] setTitle[NSString String } - (void)viewDidUnload { [self setgroupLabel:nil]; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView { // Return the number of sections in the table view return 1; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in a specific section // Since we only have one section, just return the number of rows in the table return 4; NSLog:("count is %d",[teamsInGroupA count]); } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { static NSString *cellIdentifier2 = @"Cell2"; // Reuse an existing cell if one is available for reuse UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier2]; // If no cell was available, create a new one if (cell == nil) { NSLog(@"no cell, creating"); cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier2] autorelease]; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; } NSLog(@"cell already there"); // Configure the cell to show the data for this row //[[cell textLabel]setText:[NSString string //[[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; //NSUInteger row = [indexPath row]; //[cell setText:[[teamsInGroupA objectAtIndex:indexPath:row]retain]]; //cell.textLabel.text:@"Test" [[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; return cell; } @end #import "GroupADetailViewController.h" @implementation GroupADetailViewController @synthesize groupLabel = _groupLabel; @synthesize groupADetail = _groupADetail; @synthesize teamsInGroupA; #pragma mark Memory management - (void)dealloc { [_groupADetail release]; [_groupLabel release]; [super dealloc]; } #pragma mark View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // Set the number label to show the number data teamsInGroupA = [[NSArray alloc]initWithObjects:@"France",@"Mexico",@"Uruguay",@"South Africa",nil]; NSLog(@"loaded"); // Set the title to also show the number data [[self navigationItem]setTitle:@"Group A"]; //[[self navigationItem]cell.textLabel.text:@"test"]; //[[self navigationItem] setTitle[NSString String } - (void)viewDidUnload { [self setgroupLabel:nil]; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView { // Return the number of sections in the table view return 1; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in a specific section // Since we only have one section, just return the number of rows in the table return 4; NSLog:("count is %d",[teamsInGroupA count]); } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { static NSString *cellIdentifier2 = @"Cell2"; // Reuse an existing cell if one is available for reuse UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier2]; // If no cell was available, create a new one if (cell == nil) { NSLog(@"no cell, creating"); cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier2] autorelease]; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; } NSLog(@"cell already there"); // Configure the cell to show the data for this row //[[cell textLabel]setText:[NSString string //[[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; //NSUInteger row = [indexPath row]; //[cell setText:[[teamsInGroupA objectAtIndex:indexPath:row]retain]]; //cell.textLabel.text:@"Test" [[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; return cell; } @end

    Read the article

  • App crashes when adding array data to table cells

    - by bassmandan
    I am trying to create a table view that loads a number of tweets into the table (one per cell etc). I am using NSXMLParser to get the information and have got as far as creating an array with the selection of tweets that I want. However, when I try to add them to the table cells, the app crashes on the line: cell.textLabel.text = cellValue; An NSLog before this shows in the console that the app is getting the correct data, so I am a bit stumped as to why this isn't working. This is the block of code that appears to be having the problem: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Set up the cell... NSString *cellValue = [statuses objectAtIndex:indexPath.row]; NSLog(@"%@", cellValue); cell.textLabel.text = cellValue; return cell;} If it makes a difference, I am using ARC and the latest version of XCode. I'm still quite new to all this, so if I need to give some extra information, let me know. Thanks in advance. Edit: Backtrace gives the following: * thread #1: tid = 0x2003, 0x918a19c6 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT frame #0: 0x918a19c6 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x9968ff78 libsystem_c.dylib`pthread_kill + 106 frame #2: 0x99680bdd libsystem_c.dylib`abort + 167 frame #3: 0x03c93e78 libc++abi.dylib`_Unwind_DeleteException frame #4: 0x03c9189e libc++abi.dylib`_ZL17default_terminatev + 34 frame #5: 0x0154df4b libobjc.A.dylib`_objc_terminate + 94 frame #6: 0x03c918de libc++abi.dylib`_ZL19safe_handler_callerPFvvE + 13 frame #7: 0x03c91946 libc++abi.dylib`std::terminate() + 23 frame #8: 0x03c92ab2 libc++abi.dylib`__cxa_throw + 110 frame #9: 0x0154de15 libobjc.A.dylib`objc_exception_throw + 311 frame #10: 0x013bdced CoreFoundation`-[NSObject doesNotRecognizeSelector:] + 253 frame #11: 0x01322f00 CoreFoundation`___forwarding___ + 432 frame #12: 0x01322ce2 CoreFoundation`_CF_forwarding_prep_0 + 50 frame #13: 0x0015168f UIKit`-[UILabel setText:] + 56 frame #14: 0x00003088 Twitter`-[TwitterViewController tableView:cellForRowAtIndexPath:] + 376 at TwitterViewController.m:131 frame #15: 0x000ace0f UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 494 frame #16: 0x000ad589 UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 69 frame #17: 0x00098dfd UIKit`-[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1350 frame #18: 0x000a7851 UIKit`-[UITableView layoutSubviews] + 242 frame #19: 0x00052301 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 145 frame #20: 0x013bde72 CoreFoundation`-[NSObject performSelector:withObject:] + 66 frame #21: 0x01d6692d QuartzCore`-[CALayer layoutSublayers] + 266 frame #22: 0x01d70827 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 231 frame #23: 0x01cf6fa7 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 377 frame #24: 0x01cf8ea6 QuartzCore`CA::Transaction::commit() + 374 frame #25: 0x01d8430c QuartzCore`+[CATransaction flush] + 52 frame #26: 0x000124c6 UIKit`-[UIApplication _reportAppLaunchFinished] + 39 frame #27: 0x00012bd6 UIKit`-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 1324 frame #28: 0x00021743 UIKit`-[UIApplication handleEvent:withNewEvent:] + 1027 frame #29: 0x000221f8 UIKit`-[UIApplication sendEvent:] + 68 frame #30: 0x00015aa9 UIKit`_UIApplicationHandleEvent + 8196 frame #31: 0x012a6fa9 GraphicsServices`PurpleEventCallback + 1274 frame #32: 0x013901c5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 frame #33: 0x012f5022 CoreFoundation`__CFRunLoopDoSource1 + 146 frame #34: 0x012f390a CoreFoundation`__CFRunLoopRun + 2218 frame #35: 0x012f2db4 CoreFoundation`CFRunLoopRunSpecific + 212 frame #36: 0x012f2ccb CoreFoundation`CFRunLoopRunInMode + 123 frame #37: 0x000122a7 UIKit`-[UIApplication _run] + 576 frame #38: 0x00013a9b UIKit`UIApplicationMain + 1175 frame #39: 0x0000239d Twitter`main + 141 at main.m:16 frame #40: 0x00002305 Twitter`start + 53 Debugging console shows this: 2012-04-08 10:10:05.084 Twitter[25309:f803] ( { text = "Have you shared the Shakedown yet? http://t.co/WHrIC9w7"; }, { text = "For all you closet rocknrollas pencil in Sat 12th May The Rebirth of Rock n Roll Party. Haywire Saint @ The Good... http://t.co/OXHKlLIV"; }, { text = "4 weeks today: Vocal tracks will be getting recorded at The Premises Studios"; }, { text = "Rehearsal tonight in preparation to some big recording next month!"; }, { text = "haywire saint 'great taste.' Tune. \n\nhttp://t.co/GKmu5Lna http://t.co/0fii55Hw"; }, { text = "Meeting up with an old roadie for The Cure today. oh the stories...... http://t.co/UeUYccme"; }, { text = "Satisfying day of programming today.. Haywire Saint app coming along nicely with the custom music player ready to rock 'n' roll!"; }, { text = "Happy Friday Everyone!"; }, { text = "We had a great time at The Premises Studios yesterday. We'll be back there before long :D x"; }, { text = "I posted a new photo to Facebook http://t.co/73qAnCvk"; } ) 2012-04-08 10:10:05.093 Twitter[25309:f803] { text = "Have you shared the Shakedown yet? http://t.co/WHrIC9w7"; } 2012-04-08 10:10:05.094 Twitter[25309:f803] -[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6877a50 2012-04-08 10:10:05.096 Twitter[25309:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6877a50' *** First throw call stack: (0x13bc052 0x154dd0a 0x13bdced 0x1322f00 0x1322ce2 0x15168f 0x3088 0xace0f 0xad589 0x98dfd 0xa7851 0x52301 0x13bde72 0x1d6692d 0x1d70827 0x1cf6fa7 0x1cf8ea6 0x1d8430c 0x124c6 0x12bd6 0x21743 0x221f8 0x15aa9 0x12a6fa9 0x13901c5 0x12f5022 0x12f390a 0x12f2db4 0x12f2ccb 0x122a7 0x13a9b 0x239d 0x2305) terminate called throwing an exception2012-04-08 10:10:05.924 Twitter[25309:f803] -[__NSCFConstantString count]: unrecognized selector sent to instance 0x5b30

    Read the article

  • Adding rows to a data-bound DataGridView [Winforms]

    - by Mishko
    I want to bind a table from a database to a DataGridView, but I want to also add one more row with a sum of the values in the columns with indexes 3,4,7,8,9... How can I do that? Thanks! DataTable table1 = new DataTable(); double brutoUkupno1 = 0; double porezUkupno1 = 0; double doprinosUkupno1 = 0; double netoUkupno1 = 0; double doprinosTeretUkupno1 = 0; double topliObrokUkupno1 = 0; double regresUkupno1 = 0; Connection con = new Connection(); table1 = con.boundTable(month, Convert.ToInt32(year)); //This is method which returns DataTable table1.Rows.Add(null, null, null, null, null, null, null, null, null, null, null, null, null, null); table1.Rows.Add(null, null, null, null, null, null, null, null, null, null, null, null, null, null); dgv2.Visible = true; dgv2.DataSource = table1; for (int i = 0; i < dgv2.RowCount - 2; i++) { topliObrokUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[7].Value); regresUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[8].Value); brutoUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[9].Value); porezUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[10].Value); doprinosUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[11].Value); netoUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[12].Value); doprinosTeretUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[13].Value); //Now I am having problems with this below, putting things above to dgv2 : } dgv2.Rows[dgv2.Rows.Count - 1].Cells[0].Value = "Ukupno"; dgv2.Rows[dgv2.Rows.Count - 1].Cells[3].Value = month.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[4].Value = year.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[7].Value = topliObrokUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[8].Value = regresUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[9].Value = brutoUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[10].Value = porezUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[11].Value = doprinosUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[12].Value = netoUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[13].Value = doprinosTeretUkupno1.ToString(); dgv2.Rows[dgv2.RowCount - 2].Height = 3; dgv2.Rows[dgv2.RowCount - 2].DefaultCellStyle.BackColor = Color.Black;

    Read the article

  • I have problems with adding rows to data-binded DataGridView in desktop app.

    - by Mishko
    DataTable table1 = new DataTable(); double brutoUkupno1 = 0; double porezUkupno1 = 0; double doprinosUkupno1 = 0; double netoUkupno1 = 0; double doprinosTeretUkupno1 = 0; double topliObrokUkupno1 = 0; double regresUkupno1 = 0; Connection con = new Connection(); table1 = con.boundTable(month, Convert.ToInt32(year)); //This is method which returns DataTable table1.Rows.Add(null, null, null, null, null, null, null, null, null, null, null, null, null, null); table1.Rows.Add(null, null, null, null, null, null, null, null, null, null, null, null, null, null); dgv2.Visible = true; dgv2.DataSource = table1; for (int i = 0; i < dgv2.RowCount - 2; i++) { topliObrokUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[7].Value); regresUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[8].Value); brutoUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[9].Value); porezUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[10].Value); doprinosUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[11].Value); netoUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[12].Value); doprinosTeretUkupno1 += Convert.ToDouble(dgv2.Rows[i].Cells[13].Value); //Now I am having problems with this below, putting things above to dgv2 : } dgv2.Rows[dgv2.Rows.Count - 1].Cells[0].Value = "Ukupno"; dgv2.Rows[dgv2.Rows.Count - 1].Cells[3].Value = month.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[4].Value = year.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[7].Value = topliObrokUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[8].Value = regresUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[9].Value = brutoUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[10].Value = porezUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[11].Value = doprinosUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[12].Value = netoUkupno1.ToString(); dgv2.Rows[dgv2.Rows.Count - 1].Cells[13].Value = doprinosTeretUkupno1.ToString(); dgv2.Rows[dgv2.RowCount - 2].Height = 3; dgv2.Rows[dgv2.RowCount - 2].DefaultCellStyle.BackColor = Color.Black;

    Read the article

  • DBConcurrencyException happening on second delete

    - by Malfist
    My code keeps throwing a DBConcurrencyException ("Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.) when I make a second update to the data table. The problem actually happens on a table that is linked to a parent table. The two tables, CashReceipts and CashReceiptsApplyTo are displayed on the same winform, and when I delete two cash receipts the update on cash receipt apply to's table fails with the dbconcurrencyexception (the table is updated everytime the binding source [linked to a binding navigator] changes position). Here is my code: protected override void saveToDatabase() { tblCashReceiptsBindingSource.EndEdit(); tblCashReceiptsTableAdapter.Update(rentalEaseDataSet.tblCashReceipts); //update the datatable foreach (DataGridViewRow viewRow in viewApplications.Rows) { if (viewRow.Cells[colAppID.Index].Value == null || viewRow.Cells[colApplyTo.Index].Value == null) { continue; } else if ((int)viewRow.Cells[colAppID.Index].Value == -1) { insertNewRow(viewRow); } else { updateRow(viewRow); } } try { tblCashReceiptsApplyToTableAdapter.Update(rentalEaseDataSet.tblCashReceiptsApplyTo); //tblCashReceiptsApplyToTableAdapter.Fill(rentalEaseDataSet.tblCashReceiptsApplyTo); ); } catch (Exception e) { Bitmap bitmap = new Bitmap(this.Width, this.Height); this.DrawToBitmap(bitmap, new Rectangle(0, 0, this.Width, this.Height)); saveScreenshot(this.GetType().FullName, e.Message, bitmap); MessageBox.Show("There was an error saving your changes. This means that you should close the form, and re-enter the last Receipt you entered.\n\nPlease report this."); } } The insertNewRow, and updateRow are simple: private void updateRow(DataGridViewRow viewRow) { //be forgiving if ((int)viewRow.Cells[colAppID.Index].Value == -1) { insertNewRow(viewRow); return; } //find row in table, if it's not there, crash and burn RentalEaseDataSet.tblCashReceiptsApplyToRow updateRow = rentalEaseDataSet.tblCashReceiptsApplyTo.Select("ID = " + viewRow.Cells[colAppID.Index].Value.ToString())[0] as RentalEaseDataSet.tblCashReceiptsApplyToRow; updateRow.BeginEdit(); updateRow.CashReceiptsID = (int)viewRow.Cells[colCashReceipt.Index].Value; updateRow.ApplyTo = (int)viewRow.Cells[colApplyTo.Index].Value; updateRow.Paid = CurrencyToDecimal(viewRow.Cells[colPaid.Index].Value); if (viewRow.Cells[colMemo.Index].Value != null) { updateRow.Memo = viewRow.Cells[colMemo.Index].Value.ToString(); } else { updateRow.SetMemoNull(); } updateRow.EndEdit(); } private void insertNewRow(DataGridViewRow viewRow) { //be forgiving if ((int)viewRow.Cells[colAppID.Index].Value != -1) { updateRow(viewRow); return; } RentalEaseDataSet.tblCashReceiptsApplyToRow newRow = rentalEaseDataSet.tblCashReceiptsApplyTo.NewRow() as RentalEaseDataSet.tblCashReceiptsApplyToRow; newRow.CashReceiptsID = (int) viewRow.Cells[colCashReceipt.Index].Value; newRow.ApplyTo = (int) viewRow.Cells[colApplyTo.Index].Value; newRow.Paid = CurrencyToDecimal(viewRow.Cells[colPaid.Index].Value); if (viewRow.Cells[colMemo.Index].Value != null) { newRow.Memo = viewRow.Cells[colMemo.Index].Value.ToString(); } rentalEaseDataSet.tblCashReceiptsApplyTo.Rows.Add(newRow); //update the ID viewRow.Cells[colAppID.Index].Value = newRow.ID; } Any idea why it would throw that error on the second delete?

    Read the article

  • jqGrid Coloring an entire line in Grid based upon a cells value

    - by Thomas
    Hi all, i know it's been asked before but i cant get it to run and i'm out of things to try. So i want to colorize a row in a Grid if its value is not 1 - i use a custom formatter for this. The formatter itself works, thats not the problem. I've tried multple ways I've found so far on the web - adding a class, directly adding css code, using setRowData, using setCell.... Here are my examples - none of them worked for me (linux, ff363) - any pointer would be gratly appreciated. 27.05.2010_00:00:00-27.05.2010_00:00:00 is my row id <style> .state_inactive { background-color: red !important; } .state_active { background-color: green !important; } </style> function format_state (cellvalue, options, rowObject) { var elem='#'+options.gid; if (cellvalue != 1) { jQuery('#list2').setRowData(options.rowID,'', {'background-color':'#FF6F6F'}); jQuery('#list2').setRowData('27.05.2010_00:00:00-27.05.2010_00:00:00', '',{'background-color':'#FF6F6F'}); for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_inactive',''); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'','state_inactive'); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'5', {'background-color':'#FF6F6F'},''); } } else { for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_active',''); } } <!-- dont modify, we simply added the class above--> return cellvalue; } Thanks, Thomas

    Read the article

  • Merge Cells Vertically in RTF

    - by Jimmy Johnson
    I need to programmatically generate an RTF document with a table that has a column vertically merged., e.x. ______________________________ | merged | foo | hello | | cell | | | | right |--------|----------| | here | bar | world | |_________|________|__________| I looked up online and found that the codes are \clvmgf and \clvmrg but I can't find a decent example. I made a text rtf using MS word, but there's too much junk rtf codes in it for me to figure it out where to put the \clvmgf and \clvmrg to get this to work. Could someone give me an rtf for above example table with no extraneous rtf codes so I can figure out how \clvmgf and \clvmrg works? Any additional explanation would also be greatly appreciated. Thanks!

    Read the article

  • Groupted table view cells not loading.

    - by Tejaswi Yerukalapudi
    Hi, I'm working on creating a grouped table view. The data is being loaded alright, but in the grouped view there are a lot of white empty spaces. They get populated after I scroll up and down a few times. Help? Here's my getCellForRowIndexAtPath method: static NSString *Id= @"CustomDiagChargeID"; CustomCellDiagCharges *cell = (CustomCellDiagCharges *)[tableView dequeueReusableCellWithIdentifier:Id]; if(cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCellDiagCharges" owner:self options:nil]; for (id oneObject in nib) { if([oneObject isKindOfClass:[CustomCellDiagCharges class]]) cell = (CustomCellDiagCharges *) oneObject; } } NSUInteger row = [indexPath row]; DiagDetails *rowData = [preferences getDiagElementAt:indexPath.section row:row]; cell.code.text = rowData.ICD9Code; cell.desc.text = rowData.ICD9Desc; return cell; Thanks, Teja.

    Read the article

  • Generic styles for DataGridTemplateColumn Headers & Cells

    - by user557765
    I am struggling to define templates for my DataGrid columns. Here is the code that I have working at the moment: <t:DataGrid.Columns> <t:DataGridTemplateColumn Width="75" > <t:DataGridTemplateColumn.HeaderTemplate> <DataTemplate> <TextBlock Style="{StaticResource FieldNameVertical}" Text="Date" /> </DataTemplate> </t:DataGridTemplateColumn.HeaderTemplate> <t:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Style="{StaticResource FieldValue}" Text="{Binding ModifiedDate, StringFormat='{}{0:MM/dd/yyyy}'}" /> </DataTemplate> </t:DataGridTemplateColumn.CellTemplate> </t:DataGridTemplateColumn> .. .. .. </t:DataGrid.Columns> I would like to define HeaderTemplate & CellTemplate as reusable styles -- so that each column would be as brief as something like this: <t:DataGrid.Resources> <DataTemplate x:Key="dgHeaderStyle"> <TextBlock Style="{StaticResource FieldNameVertical}" Text="{Binding}" /> </DataTemplate> <DataTemplate x:Key="dgCellStyle"> <TextBlock Style="{StaticResource FieldValue}" Text="{Binding}" /> </DataTemplate> </t:DataGrid.Resources> <t:DataGrid.Columns> <t:DataGridTemplateColumn Width="75" Header="Date" Binding="{Binding ModifiedDate, StringFormat='{}{0:MM/dd/yyyy}'}" HeaderTemplate="{StaticResource dgHeaderStyle}" CellTemplate="{StaticResource dgCellStyle}" /> <t:DataGridTemplateColumn Width="100" Header="Dealer" HeaderTemplate="{StaticResource dgHeaderStyle}" CellTemplate="{StaticResource dgCellStyle}" /> ... </t:DataGrid.Columns> Every attempt I make has failed. I had hoped to implement something like the "solution" snippet in the initial entry of WPF DataGrid HeaderTemplate Mysterious Padding. However, I can't seem to adapt it to what I'm doing.

    Read the article

  • How to get table cells evenly spaced?

    - by DaveDev
    I'm trying to create a page with a number of static html tables on them. What do I need to do to get them to display each column the same size as each other column in the table? The HTML is as follows: <span class="Emphasis">Interest rates</span><br /> <table cellpadding="0px" cellspacing="0px" class="PerformanceTable"> <tr><th class="TableHeader"></th><th class="TableHeader">Current rate as at 31 March 2010</th><th class="TableHeader">31 December 2009</th><th class="TableHeader">31 March 2009</th></tr> <tr class="TableRow"><td>Index1</td><td class="PerformanceCell">1.00%</td><td>1.00%</td><td>1.50%</td></tr> <tr class="TableRow"><td>index2</td><td class="PerformanceCell">0.50%</td><td>0.50%</td><td>0.50%</td></tr> <tr class="TableRow"><td>index3</td><td class="PerformanceCell">0.25%</td><td>0.25%</td><td>0.25%</td></tr> </table> <span>Source: Bt</span><br /><br /> <span class="Emphasis">Stock markets</span><br /> <table cellpadding="0px" cellspacing="0px" class="PerformanceTable"> <tr><th class="TableHeader"></th><th class="TableHeader">As at 31 March 2010</th><th class="TableHeader">1 month change</th><th class="TableHeader">QTD change</th><th class="TableHeader">12 months change</th></tr> <tr class="TableRow"><td>index1</td><td class="PerformanceCell">1169.43</td><td class="PerformanceCell">5.88%</td><td class="PerformanceCell">4.87%</td><td class="PerformanceCell">46.57%</td></tr> <tr class="TableRow"><td>index2</td><td class="PerformanceCell">1958.34</td><td class="PerformanceCell">7.68%</td><td class="PerformanceCell">5.27%</td><td class="PerformanceCell">58.31%</td></tr> <tr class="TableRow"><td>index3</td><td class="PerformanceCell">5679.64</td><td class="PerformanceCell">6.07%</td><td class="PerformanceCell">4.93%</td><td class="PerformanceCell">44.66%</td></tr> <tr class="TableRow"><td>index4</td><td class="PerformanceCell">2943.92</td><td class="PerformanceCell">8.30%</td><td class="PerformanceCell">-0.98%</td><td class="PerformanceCell">44.52%</td></tr> <tr class="TableRow"><td>index5</td><td class="PerformanceCell">978.81</td><td class="PerformanceCell">9.47%</td><td class="PerformanceCell">7.85%</td><td class="PerformanceCell">26.52%</td></tr> <tr class="TableRow"><td>index6</td><td class="PerformanceCell">3177.77</td><td class="PerformanceCell">10.58%</td><td class="PerformanceCell">6.82%</td><td class="PerformanceCell">44.84%</td></tr> </table> <span>Source: B</span><br /><br /> I'm also open to suggestion on how to tidy this up, if there are any? :-)

    Read the article

  • How to get keypressed, keydown events from DataGridView data cells

    - by extropy
    Hi. I need to recieve the key press events during cell editing in DataGridView control. From what I have found on the net the DataGridView is designed to pass all key events from DataGridView to the cell editing control and you cannot get these events easily. I found this peace of code http://www.codeproject.com/KB/grid/DataGridCellEvents.aspx that traps those events for DataGrid control, but that does not work for DataGridView.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >