|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
listviewSomething weird is happening to me: I have a listview that I would like to sort in a special way. Because of that I have two different functions that sort it. I run the following code: Sort1(listv) Sort(listv) Me.ShowDialog() The funny thing is that after this, the ShowDialog only shows the listview affected by the second function, it looks like it skipped the first one!!! But if instead we run this code Sort11(listv) Me.ShowDialog() Sort2(listv) Me.ShowDialog() After the second call to ShowDialog, the result is perfect and the items are sorted as the desired way. I feel it must happen some event or something inside the ShowDialog that updates the listview and I am missing it in the first code. What that could be? I will be thankful if anyone could give me some advice. Thanks a lot! Vmrincon schrieb:
> Sort11(listv) It might be helpful if you post the code of your Sort-functions and> Me.ShowDialog() > Sort2(listv) > Me.ShowDialog() where you call them. > After the second call to ShowDialog, the result is perfect and the Do you call Listview1.update() in both of your sort-functions??> items are sorted as the desired way. I feel it must happen some event > or something inside the ShowDialog that updates the listview and I am > missing it in the first code. What that could be? I will be thankful if > anyone could give me some advice. Actually, you might want to look up:
Listview.Sort in the documentation. You can write your own custom sorter, however you see fit just by implementing the IComparer interface. Steve Show quoteHide quote "Vmrincon" <vmrin***@gmail.com> wrote in message news:1161255102.868822.157640@m7g2000cwm.googlegroups.com... > Hi everybody: > > Something weird is happening to me: > > I have a listview that I would like to sort in a special way. > Because of that I have two different functions that sort it. I run the > following code: > > Sort1(listv) > Sort(listv) > Me.ShowDialog() > > The funny thing is that after this, the ShowDialog only shows the > listview affected by the second function, it looks like it skipped the > first one!!! > > But if instead we run this code > > > Sort11(listv) > Me.ShowDialog() > Sort2(listv) > Me.ShowDialog() > > > After the second call to ShowDialog, the result is perfect and the > items are sorted as the desired way. I feel it must happen some event > or something inside the ShowDialog that updates the listview and I am > missing it in the first code. What that could be? I will be thankful if > anyone could give me some advice. > > Thanks a lot! > Well thanks to both of you, but I already fixed the problem running
just on of the sorting methods with a more complicated logic. Greetings, Victor Steve Long wrote: Show quoteHide quote > Actually, you might want to look up: > Listview.Sort in the documentation. You can write your own custom sorter, > however you see fit just by implementing the IComparer interface. > > Steve > > "Vmrincon" <vmrin***@gmail.com> wrote in message > news:1161255102.868822.157640@m7g2000cwm.googlegroups.com... > > Hi everybody: > > > > Something weird is happening to me: > > > > I have a listview that I would like to sort in a special way. > > Because of that I have two different functions that sort it. I run the > > following code: > > > > Sort1(listv) > > Sort(listv) > > Me.ShowDialog() > > > > The funny thing is that after this, the ShowDialog only shows the > > listview affected by the second function, it looks like it skipped the > > first one!!! > > > > But if instead we run this code > > > > > > Sort11(listv) > > Me.ShowDialog() > > Sort2(listv) > > Me.ShowDialog() > > > > > > After the second call to ShowDialog, the result is perfect and the > > items are sorted as the desired way. I feel it must happen some event > > or something inside the ShowDialog that updates the listview and I am > > missing it in the first code. What that could be? I will be thankful if > > anyone could give me some advice. > > > > Thanks a lot! > >
main menu disappearred
If comparision operator is one of these or contains ? Table Adapter Update Method Question about walking the file system Show ToolTip on every Control continuously Starting process using shell execute returns nothing Rounding issue Incomplete Escaping Functionality?? Transparent Checked List Box check in program |
|||||||||||||||||||||||