Click here to Skip to main content
15,913,055 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Generalmulti-user project design Pin
User 814711-Sep-03 5:35
User 814711-Sep-03 5:35 
GeneralRe: multi-user project design Pin
Michael P Butler11-Sep-03 5:49
Michael P Butler11-Sep-03 5:49 
QuestionIMessage Interface in Remoting? Pin
0siris11-Sep-03 3:20
0siris11-Sep-03 3:20 
GeneralStandardPrinter Pin
gecko2310-Sep-03 3:13
gecko2310-Sep-03 3:13 
GeneralCatching exception when starting exe from network drive Pin
the-unforgiven9-Sep-03 9:36
the-unforgiven9-Sep-03 9:36 
GeneralRe: Catching exception when starting exe from network drive Pin
0siris11-Sep-03 4:45
0siris11-Sep-03 4:45 
GeneralRe: Catching exception when starting exe from network drive Pin
Michael D Bray18-Sep-03 4:28
Michael D Bray18-Sep-03 4:28 
GeneralComplex data binding and ListView column sorting problem Pin
zinzinlabine7-Sep-03 6:18
zinzinlabine7-Sep-03 6:18 
Hi,

I'm using a BindableListview for which I found the code on the web:

http://www.interact-sw.co.uk/utilities/bindablelistview/source[^]

and I'm also using the ListViewSortManager found on Code Project:

http://www.codeproject.com/cs/miscctrl/lvsortmanager.asp[^]

I have found a funny interaction between the two. After binding the ListView to the DataSource (a DataTable), when the ListView is re-sorted the data gets out of sync.

For testing purposes, I added a TextBox and a CheckBox (one of the column is Boolean), which also bind to the same DataSource.

After setting the ListView and the Controls' DataSource to the same DataTable, the data is synced such that if I select a row in the ListView, the TextBox and CheckBox show the proper values.

Now, after sorting the data using different columns, the TextBox and CheckBox don't show the same values as the selected row in the ListView.

I'm assuming this is because the DataBindings are using an index, and that re-sorting the ListView differently doesn't necessarly affect that index.

How would I proceed to "re-index" the data such that clicking an item in the ListView brings up the proper data in the textBox and CheckBox ?

I've tried doing the same with the DataGrid, and found that the DataGrid works fine, ie the data stays in sync. What does the DataGrid do in order to achieve that ?

Thanks.

Luc Morin
GeneralReflection question Pin
Gluber20026-Sep-03 15:54
Gluber20026-Sep-03 15:54 
GeneralRe: Reflection question Pin
leppie7-Sep-03 4:08
leppie7-Sep-03 4:08 
GeneralSuspendLayout() doen't work on richTextBox Pin
eranas3-Sep-03 21:07
eranas3-Sep-03 21:07 
GeneralRe: SuspendLayout() doen't work on richTextBox Pin
leppie7-Sep-03 4:14
leppie7-Sep-03 4:14 
GeneralExposing properties (COM interop) Pin
Elbie2-Sep-03 5:31
Elbie2-Sep-03 5:31 
GeneralOverriding Paint message in TextEditBase or RichEditBox Pin
NormDroid2-Sep-03 4:46
professionalNormDroid2-Sep-03 4:46 
GeneralIPicture to System.Drawing.Image Pin
Corinna John2-Sep-03 3:37
Corinna John2-Sep-03 3:37 
GeneralTimezones and Date formatting Pin
AJB...1-Sep-03 10:05
AJB...1-Sep-03 10:05 
GeneralRe: Custom Collection based on ... Pin
dog_spawn4-Sep-03 16:58
dog_spawn4-Sep-03 16:58 
General.net DataSet Relations Lost.... Pin
mgaerber27-Aug-03 4:44
mgaerber27-Aug-03 4:44 
Generallost? Pin
dog_spawn4-Sep-03 17:02
dog_spawn4-Sep-03 17:02 
GeneralRe: lost? Pin
mgaerber9-Sep-03 20:12
mgaerber9-Sep-03 20:12 
GeneralVARIANT* in COM Interop Pin
Elbie27-Aug-03 0:48
Elbie27-Aug-03 0:48 
GeneralRe: VARIANT* in COM Interop Pin
Elbie27-Aug-03 5:08
Elbie27-Aug-03 5:08 
GeneralRe: VARIANT* in COM Interop Pin
igor19603-Sep-03 10:28
igor19603-Sep-03 10:28 
General.NET component in MFC applicaiton Pin
Member 45183026-Aug-03 20:23
Member 45183026-Aug-03 20:23 
GeneralRe: .NET component in MFC applicaiton Pin
J. Dunlap26-Aug-03 21:23
J. Dunlap26-Aug-03 21:23 

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.