Click here to Skip to main content
15,881,715 members
Home / Discussions / C#
   

C#

 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
Paul Riley22-Sep-02 14:43
Paul Riley22-Sep-02 14:43 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
stephen woolhead22-Sep-02 14:48
stephen woolhead22-Sep-02 14:48 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
Paul Riley22-Sep-02 14:59
Paul Riley22-Sep-02 14:59 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
stephen woolhead23-Sep-02 0:34
stephen woolhead23-Sep-02 0:34 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
Paul Riley23-Sep-02 1:27
Paul Riley23-Sep-02 1:27 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
stephen woolhead23-Sep-02 2:46
stephen woolhead23-Sep-02 2:46 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
Paul Riley23-Sep-02 3:07
Paul Riley23-Sep-02 3:07 
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
stephen woolhead23-Sep-02 5:31
stephen woolhead23-Sep-02 5:31 
Paul Riley wrote:
Not even using ODBC.NET[^]?

I need to access a password protected Paradox table (not by choice Smile | :) ), and as far as I know there is no way to do that with ODBC. So I have a Managed C++ dll that uses the BDE directly to build me a Dataset.


Paul Riley wrote:
stephen woolhead wrote:
I could use the Hidden ID column and search by Primary key method to find the row in the dataset, it just seems wrong when there must be a direct link back to the row in the dataset somewhere.

There isn't, I'm afraid. DataSets and DataGrids are two completely unrelated things, Daatabinding just allows you to link them. You have to create your own link between records like that.


I have fianlly worked it out, looks something like this using the previous delete example...

BindingManagerBase cm = this.BindingContext[dg.DataSource] ;<br />
DataRowView drv = (DataRowView )cm.Current ;<br />
((DataRow )drv.Row).Delete () ;


I found this was a good link if you MSDN installed

ms-help://MS.MSDNQTR.2002APR.1033/vbcon/html/vbconConsumersOfDataOnWindowsForms.htm[^]

While there is no direct link between the dataSet and the DataGrid, there are container level objects that you can access that are looking after it for you.

Anyway, thanks for all your replies, they really helped.

Stephen.
GeneralRe: Maching the row in a datagrid to a row in a DataTable Pin
Paul Riley23-Sep-02 5:42
Paul Riley23-Sep-02 5:42 
Generalhelp Pin
imran_rafique22-Sep-02 13:53
imran_rafique22-Sep-02 13:53 
GeneralRe: help Pin
Stephane Rodriguez.22-Sep-02 20:15
Stephane Rodriguez.22-Sep-02 20:15 
GeneralDesktop Hierarchy Pin
Wjousts22-Sep-02 13:41
Wjousts22-Sep-02 13:41 
GeneralRe: Desktop Hierarchy Pin
Paul Riley22-Sep-02 15:07
Paul Riley22-Sep-02 15:07 
Questionhelp? Pin
imran_rafique22-Sep-02 13:35
imran_rafique22-Sep-02 13:35 
GeneralDragging files onto a windows form Pin
zimbar22-Sep-02 5:01
zimbar22-Sep-02 5:01 
GeneralRe: Dragging files onto a windows form Pin
Stephane Rodriguez.22-Sep-02 5:20
Stephane Rodriguez.22-Sep-02 5:20 
GeneralCustom Control Pin
Donald Blachly21-Sep-02 18:55
Donald Blachly21-Sep-02 18:55 
GeneralRe: Custom Control Pin
Stephane Rodriguez.21-Sep-02 21:24
Stephane Rodriguez.21-Sep-02 21:24 
GeneralRe: Custom Control Pin
James T. Johnson21-Sep-02 21:42
James T. Johnson21-Sep-02 21:42 
GeneralRe: Custom Control Pin
Stephane Rodriguez.21-Sep-02 22:59
Stephane Rodriguez.21-Sep-02 22:59 
GeneralRe: Custom Control Pin
James T. Johnson21-Sep-02 23:13
James T. Johnson21-Sep-02 23:13 
GeneralRe: Custom Control Pin
Donald Blachly22-Sep-02 3:47
Donald Blachly22-Sep-02 3:47 
QuestionCentering a window at runtime? Pin
Zinj21-Sep-02 14:00
sussZinj21-Sep-02 14:00 
AnswerRe: Centering a window at runtime? Pin
David Stone21-Sep-02 14:14
sitebuilderDavid Stone21-Sep-02 14:14 
AnswerRe: Centering a window at runtime? Pin
James T. Johnson21-Sep-02 14:30
James T. Johnson21-Sep-02 14:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.