Click here to Skip to main content
15,919,879 members
Home / Discussions / C#
   

C#

 
GeneralRe: Ackermann Function Pin
Bill Dean4-May-04 4:38
Bill Dean4-May-04 4:38 
GeneralRe: Ackermann Function Pin
Dave Kreskowiak4-May-04 4:50
mveDave Kreskowiak4-May-04 4:50 
GeneralCalling c++ function (callback) from managed code. Pin
venkatareddym4-May-04 4:15
venkatareddym4-May-04 4:15 
GeneralRe: Calling c++ function (callback) from managed code. Pin
Heath Stewart4-May-04 4:29
protectorHeath Stewart4-May-04 4:29 
Generalsort a Datagrid Pin
bertcox4-May-04 3:27
bertcox4-May-04 3:27 
GeneralRe: sort a Datagrid Pin
Heath Stewart4-May-04 3:56
protectorHeath Stewart4-May-04 3:56 
GeneralRe: sort a Datagrid Pin
bertcox4-May-04 20:49
bertcox4-May-04 20:49 
GeneralRe: sort a Datagrid Pin
Heath Stewart5-May-04 3:00
protectorHeath Stewart5-May-04 3:00 
Yes, I understand what you're trying to do - and always have - but I believe it's you that's not understand the solution. If you use the row index in the DataView - it's the row index of the sorted view and that will return you the correct DataRow, which you can use to change information in its columns or remove from the table (by referring to the DataRow itself - forget about the index).

Besides, why do you even care anyway? In the DataGrid, if the user makes any changes the correct data is changed / inserted / deleted. All you need to do is get the DataSet or DataTable from the DataGrid.DataSource property and call DataSet.GetChanges to get a DataSet of just the changes (not required but it does decrease bandwidth consumption and boost performance in a distributed system).

A DataView is just the view on the data. It tracks the DataRow as it sorts and filters them.

 

Microsoft MVP, Visual C#
My Articles
QuestionHow to change system date in .NET Pin
Anonymous4-May-04 3:24
Anonymous4-May-04 3:24 
AnswerRe: How to change system date in .NET Pin
Colin Angus Mackay4-May-04 3:31
Colin Angus Mackay4-May-04 3:31 
GeneralRe: How to change system date in .NET Pin
Heath Stewart4-May-04 3:35
protectorHeath Stewart4-May-04 3:35 
GeneralRe: How to change system date in .NET Pin
Jeff Varszegi4-May-04 7:14
professionalJeff Varszegi4-May-04 7:14 
GeneralRe: How to change system date in .NET Pin
Heath Stewart4-May-04 8:03
protectorHeath Stewart4-May-04 8:03 
GeneralRe: How to change system date in .NET Pin
Jeff Varszegi4-May-04 8:22
professionalJeff Varszegi4-May-04 8:22 
GeneralRe: How to change system date in .NET Pin
Heath Stewart4-May-04 8:27
protectorHeath Stewart4-May-04 8:27 
GeneralRe: How to change system date in .NET Pin
Jeff Varszegi4-May-04 8:33
professionalJeff Varszegi4-May-04 8:33 
GeneralRe: How to change system date in .NET Pin
Heath Stewart4-May-04 8:46
protectorHeath Stewart4-May-04 8:46 
GeneralRe: How to change system date in .NET Pin
eggie54-May-04 15:50
eggie54-May-04 15:50 
GeneralUpdate dataset Pin
Appelz4-May-04 2:39
Appelz4-May-04 2:39 
GeneralRe: Update dataset Pin
Heath Stewart4-May-04 4:31
protectorHeath Stewart4-May-04 4:31 
Generalassociate the ContextMenu Pin
cristina_tudor4-May-04 2:23
cristina_tudor4-May-04 2:23 
GeneralRe: associate the ContextMenu Pin
Bill Dean4-May-04 4:28
Bill Dean4-May-04 4:28 
GeneralRe: associate the ContextMenu Pin
Mike Dimmick4-May-04 5:29
Mike Dimmick4-May-04 5:29 
GeneralRe: associate the ContextMenu Pin
Bill Dean4-May-04 5:47
Bill Dean4-May-04 5:47 
GeneralRe: associate the ContextMenu Pin
Syed Abdul Khader4-May-04 5:44
Syed Abdul Khader4-May-04 5:44 

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.