Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Donnelly James

@Donnelly James
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to auto-select a newly added row in the DataGrid? [modified]
    D Donnelly James

    After searching long and hard I finally found a way to do it. Makes me wonder why I didn't think of this before. for ( int i = 0; i < GridContact.Rows.Count; i++ ) { if ((int)GridContact.Rows[i].Cells[1].Value == ID ) { GridContact.ClearSelection(); GridContact.Rows[i].Selected = true; } }

    C# question csharp delphi html com

  • How to auto-select a newly added row in the DataGrid? [modified]
    D Donnelly James

    I'm sorry I'm taking so long to reply to this thread, I'm a little busy. Ok so everything you said works but now how do I select the newly added row. I've tried several ways so far. e.g. this.bindingsource.contains(NewID), this.bindingsource.find(NewID). this.bindingsource.FindRows(NewID). But they never select any row except the very first row.

    C# question csharp delphi html com

  • How to auto-select a newly added row in the DataGrid? [modified]
    D Donnelly James

    It's an SQL Server database and we do have identity columns but they are no primary key columns. I am able to use @@Identity and Scope_Identity() in the Delphi App and it works fine. I just need to figure out how to do it in C#.

    C# question csharp delphi html com

  • How to auto-select a newly added row in the DataGrid? [modified]
    D Donnelly James

    If anyone is familiar with Delphi and it's TADOQuery component, I would like to do something similar to the TADOQuery.Locate method. If your not familiar with Delphi's TADOQuery.Locate, I want to be able to programatically select a newly added row. So the user can have a visual reference that a post was successful. I read online sometime a ago that the TableAdapter.Select() method was the way to go but I can't seem to get it to work. Anyone? I found this answer here http://www.akadia.com/services/dotnet\_find\_methods.html but it requires your tables to have primary keys and just my luck none of my tables have primary keys. By the way I didn't create these tables. How do I do the find without primary keys? I don't want to have to add them to all my Tables.

    modified on Friday, April 16, 2010 4:53 PM

    C# question csharp delphi html com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups