Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Sorting On DATE Columns In MS List View


Does anybody know how to get this to work?

The listview seems only capable of accepting strings as it's items so dates have to be converted to text and therefore are sorted as text.

How can I get around this?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
List View Date Sorting
Greetings and Salutations!

How can I sort a list view column that is a date so that it is sorted properly.

The only way I can do it is to input the date as yyyy/mm/dd.

I want to have the date as mm/dd/yyyy but then the list is sorted by month no matter what the year is.

I have seen it done in other applications....

Any help would be appreciated!!

2 Columns In List View:
i ahve a list view box, when i click the add button, i need to be able to add:
add.text in the first column
desc.text in the second column

but i can only get add.text in the first column.......

Ordering Columns In A List View
I know I can use the ascending and descending properties to order the first column in a list view, but how can I order the other columns as well?

Listview Columns In List View
I am trying to use Listview to import data from an Access table and I only want to use the list view not the list report. The data imports OK and populates the list OK into (in this case with the quantity of data imported) 4 columns.

Trouble is, all the data is truncated and I can find no way of setting the column widths as you can in the normal list box. I do not have any sub-items, just a single list so I do not need to set up any column headers.

Sorting A List View
Hi!

I have a List View with items that correspond to folders and items that correspond to files.
When i sort the listview (.Sorted=True) the folder items and the file items get mixed up. Is there any way i can keep this two kinds of item separated withount having to sort them myself.
For instance is the a way to order the listview by two or more columns?

Thanks!

List View Select - Multiple Columns
I have a listview control with two columns...

1. File Name
2. Extension

When I selected the file I return the file name, but if i want to retrieve the properties regarding the file i need the extension which is in column 2...

This will get the information in column 1 (File Name)

Set objFile = objFSO.GetFile(DirList.List(DirList.ListIndex) & "" & lstFileList.SelectedItem.Text)

How do I get it so that it gets the info in column 1 and adds the info of column 2 to that string? i.e.

file name extension
mydoc doc
myvideo avi
myemail eml

i want it so that when i click on mydoc the string becomes... mydoc.doc, any ideas? thanks
- gabe

How Do I Hide/unhide Columns In A List View?
I want the user to choose the columns for a specified output though all the columns will be filled

with data , i want to display only those columns which the user selects.Currently i make the width

of the hidden column as - 0 but that the user can just keep his mouse on the header and drag to

see the hidden column. How do I actually hide it???

Freeze The Columns Of List View Control
Hi Gurus,
I want to freeze the columns of a Listview control in Report view mode. Is there any property of List View or any other code example to show me how to prevent the columns to be resized by the user?

Help me plz, it is really necessary.

Waqas...

List View Find Text By Corrosponding Columns
Hi, i have a list view with 2 coumns and it retrieve information from a server and it contains different amounts of information at once.

What i need to do is locate in the first column of the listview anything containing
the index "hostname" then go retrieve the hostname which would be in the next column in the exact row. So it looks like this

Column 1 - Column 2
=====================
ip add - 192.168.blahblah
hostname - TheTestName

i want to retrieve "TheTestName" by finding the column "hostname" but i have no ideas how to achieve this. If anyone could help me out that would be great.

2 Qs : Timer And How Do I Hide/unhide Columns In A List View?
hi,
2 questions
For a listview, I want the user to choose the columns for a specified output though all the columns will be filled with data , i want to display only those columns which the user selects(Like we have it in windows explorer). Currently I make the width of the hidden column as - 0 but that the user can just keep his mouse on the header and drag to see the hidden column. How do I actually hide it???

Second question:

I have just recently find out that one cannot set the interval time of a timer for than 65000 millisecs that is apporx a minute. How do I set the interval of a timer for more than a minute say 3 minutes?

Thanks.

How To Sort Columns In List View -- Just Like Windows Explorer
Hi,

I am using ListView Control.. I want to sort the listview on a particular column when user selects it. Is there any direct way of doing this.. And can I set colors to rows in a Listview control.. Like I have a situation where I want alternate colours to be displayed.. Is it possible

Regards

Surya Prakash

List View Sorting And Internal Indexes
This post may sound similar to another I posted recently but it is different. I have several list views which I am using the default sort(ascii) and a special group of routines to sort numeric and date fields. The problem with this is that my internal indexes are not being sorted while my list views ui is. Is there a way to resort the index? If it helps, I am using SendMessage and LVM_FINDITEM along with other messages to do the sorting for numbers and dates. Thanks in advance.

Following is my case statement:
Select Case ColumnHeader.Index
Case 3, 5:
'Use default sorting to sort the items in the list
TheList.SortKey = ColumnHeader.Index - 1
TheList.SortOrder = (-1 * TheList.SortOrder) + 1
TheList.Sorted = True

Case 4:
'Use sort routine to sort by date
TheList.Sorted = False
SendMessageLong TheList.hWnd, _
LVM_SORTITEMS, _
TheList.hWnd, _
AddressOf CompareDates

Case 1, 2:
'Use sort routine to sort by value
TheList.Sorted = False
SendMessageLong TheList.hWnd, _
LVM_SORTITEMS, _
TheList.hWnd, _
AddressOf CompareValues
End Select

Sorting A Date Field In The List?
I have a list, that displays there columns,one of them is a date field and when I go into properties I can assign sorting properties for each of those column,so that is what I have done.

But the product of the date field sort is that the field is sorted like (1 apr 1999, 1 apr 2000) so it really sorts by the first digit, insted of looking at the date as a whole.

i am not aware if we can do anything to get this to sort the way I need it, and if not how would you do it and can it be done, I am sure it can.

Thanks

List View Sort In Date Order
Hi everyone, I'm stumped... maybe someone has an answer in this forum.
I have a listview that has 3 columns, one of them is just a simple description, the other is a numeric name, and the third is a date. I need to be able to sort in descending order when clicking on the header of each column. The description field is no problem, I just use listview.sort. The problem is when I try to sort dates, if I use the same thing I get 8/01/01 before 12/01/01 because 8 comes after 1 alphabetically... is there anyway to do this? I can only think of clearing the listview, sort the dates and then load them to the listview again, but that would take too long... and it seems like going the long way about it.
Please help!

Monica

Displaying Icon According To Date In List View...plz Help Me Out!!
well i have listview in report mode, imagelist containing two images in a form

-form is loaded firstcolumn of listiview displays the dates......dates may be present, past or future dates
-2nd column displays time, and time also may be past or future time
-All i want to do is that........if date and time is still to come......then it shows icon in first listitem from imagelist

with index 1
-if date and time is past then it shows icon in first listitem from imagelist with index 2
-if date is present and time is already past then it shows icon in first listitem from imagelist with index 1

Please someone help me out!!


thanks
saracjl

Sorting Array With 5 Columns By Any Column Or Columns
Hi all!
I have an array with 5 columns:
- city
- first name
- last name
- birth date
- children quantity

How can I sort this array by any column, for example by 4?
And how can I sort it by few columns, for example:
sort by 5 then sort by 1 then sort by 3?

Visual Basic List View Control To View Network Computers
Hi,

I am working on simple network connect utility and ready with the functinality. But I am stuck at a very important aspect of the GUI where I need a List View Control that will view the computers from the available LAN domains. And will let us select a particular computer on expanding the domain List Item. If not a list view then a treeview rather.

Also will this control let me select a NETWORK COMPUTER ONLY but not shared folders on its individual drives. Only computers has to be selected. Not the nodes (folders) shared at them.

Thanks.

Vinitsankhe.

Windows File Explorer.. Icon View And List View.
I'm trying to duplicate a function of the explorer.. The folder contents view.

See example of what I mean...
http://www.ibarn.net/fun/files/thumblist.jpg

I can do everything I need using the filelistbox with the sole exception of changing the display style. I don't want a file list, I want a list-view or icon-view. (Preferably both, with the option to switch between them.)

So my question to you fine people is...... what API or component could I find this capacity in? I've looked at all of the components and didn't see anything that looked close, and a search on the subject yeilds hundreds of people trying to emulate the "filemanager" explorer style, but none trying to kick out a normal, boring icon view like this.

Any help would be greatly appreciated.

Thanks.

List View PopUp Prob (lvwIcon View) *Resolved*
Hi all,

I have a listview in large icon view (lvwIcon). I have a popup menu displaying some options when the user right clicks an item that is specific for that item.

My question is this -

I want a different popup menu to show when the user right-clicks on a blank area of the listview which would display general options.

In my testing, whenever a blank area is clicked, the selected item is the first item (if none had been selected) or the current selected item (if one had already been selected).

I currently use the selecteditem.text to determine what pop up menu is to be used.


I guess in theory the code might be something like ;


Code:
If lvwMain.SelectedItem = Nothing then
PopupMenu mnuGeneral
Else
PopupMenu mnuSpecific
End If


Any help would be greatly appreciated.

Cheers

Jack

Sorting On 5 Columns
How do I sort on 5 different columns of data using VB?

I'm trying to sort a table using 5 different sort keys. This is what I've got so far but I'm getting the error message "Run time error 1004. Application defined or object defined error."

Code:
Selection.Sort _
Key1:=Range("I2"), Order1:=xlAscending, _
Key2:=Range("L2"), Order2:=xlAscending, _
Key3:=Range("J2"), Order3:=xlAscending, _
Key4:=Range("K2"), Order4:=xlAscending, _
Key5:=Range("B2"), Order5:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

I'm assuming that I can't use more than the 3 keys that Excel gives you by default, so my code is incorrect. Either that or I hosed up my code.

Sorting Columns
I'm having difficulty sorting columns correctly in Excel. Since I'm kind of a hack, I usually record macros of the actions that I can do from drop-down menus and then adjust them to my needs. Recording the macro doesn't seem to help in this case; here's why:

I have data that are numbered, say, 1-50 descending down a column. If I use the sort command to sort them, I end up with this:

1
10
11
12
13
14
15
16
17
18
19
2
20
etc...

Any ideas why it does this and how to correct it?

Thanks!

Sorting Columns
Hey all i am in need of some help trying to sort a column in my sheet. This is the code i have that works....

Code:
Dim theNextLine As String

theNextLine = Right("Data!B2:" & Range("B2").End(xlDown).Address, 1)
Worksheets("Data").Range("B2:B" & theNextLine).Sort Worksheets("Data").Range("B2")
BUT it only sorts the B column and doesnt move any of the other information in the other colums with it!

How can i do this to achive what you would get with highlighting the "B" column and hitting the filter button and telling it to sort A-Z?

BTW, the reason why i want to sort by the "B" column is that its the last name of the people...

Thanks!
David

Sorting On More Then 3 Columns ?
When i record the sorting of my range on 3 columns, this is the code i end up with :


Code:
Sub Macro1()
Range("A10").Select
Range("A10:R111").Sort Key1:=Range("C11"), Order1:=xlAscending, Key2:= _
Range("E11"), Order2:=xlAscending, Key3:=Range("G11"), Order3:= _
xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal, DataOption3:=xlSortNormal
End Sub
As i need to sort on more then 3 columns, i simply tried to add another key (key4), like this :


Code:
Sub Macro2()
Range("A10").Select
Range("A10:R111").Sort Key1:=Range("C11"), Order1:=xlAscending, Key2:= _
Range("E11"), Order2:=xlAscending, Key3:=Range("G11"), Order3:= _
xlAscending, Key4:=Range("Q11"), Order4:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal, DataOption3:=xlSortNormal, DataOption4:=xlSortNormal
End Sub
It doesn't work, apparently Excel doesn't like my fourth key

Does anyone know how to sort on 4 (or more) columns ?

Sorting Columns In LV
VB Code:
Private Sub srvplayers_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)        'Check if the Sortkey is the same a the current one    If SrvPlayers.SortKey <> ColumnHeader.Index - 1 Then        'When a column is clicked set the sortkey        'to the columnheader index -1        SrvPlayers.SortKey = ColumnHeader.Index - 1        SrvPlayers.SortOrder = lvwAscending    Else        'If the column is already selected then change the        'sortorder to be the opposite of what is currently        'being used        SrvPlayers.SortOrder = IIf(SrvPlayers.SortOrder = lvwAscending, _                                lvwDescending, lvwAscending)    End If        'Set the sorted property to use the new sortkey    'and sort the contents    SrvPlayers.Sorted = True    SrvPlayers.Sorted = FalseEnd Sub


Now, that normally works okay. But i have added in the first row numbers from one to about 30. This code sorts them crazy, it has 9 and 10 as the first two!Are they being stored as variants or strings?

Sorting In A ListView With Columns
I hope you guys can help me out as it's getting frustrating

The code I have so far when a column header is clicked on in the listview is this -


Code:
Private Sub lvFaults_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)

If Not lvFaults.Sorted Then
lvFaults.Sorted = True
End If

Dim intColumn

Select Case ColumnHeader
Case Is = "Fault No"
intColumn = 0
Case Is = "Reported By"
intColumn = 1
Case Is = "Office"
intColumn = 2
Case Is = "Date"
intColumn = 3
End Select

If lvFaults.SortOrder = lvwAscending Then
lvFaults.SortKey = intColumn
lvFaults.SortOrder = lvwDescending
Else
lvFaults.SortKey = intColumn
lvFaults.SortOrder = lvwAscending
End If

End Sub
This half works but the ordering is a bit funny and I'm guessing most of you know what I mean. But basically the Fault No column starts at 4 digit numbers but currently are up to 5 digit numbers (it's an autonumber from a database) so it's sorting them like this -

10282
10283
10285
8728
9644
9672

And the date is sorted like -

01/03/2004
01/10/2003
05/03/2004
09/02/2004
12/02/2004

Anyone have any ideas? Thanks

Sorting Listview Columns
I have this code to sort the columns in a listview.

Columns 1, 3, 4, 5 are not to be used for sorting.

Column 0 is a date column, so I reload the listview (from Access database) with the sort order in the SQL statement.

Column 2 is a straight forward Ascending or Descending.

The problem I am getting is that if I sort by column 2 first and then by column 0, it doesn't sort in the correct date order, even though the strSQL statement is correct.

Any ideas where I am wrong?

I am guessing it's something to do with how I set the Listvew.SortKey maybe!


Code:
Select Case ColumnHeader.Index - 1
Case 0
If lvwCourseListYear.SortKey <> ColumnHeader.Index - 1 Then
lvwCourseListYear.SortKey = ColumnHeader.Index - 1
End If

'\store the sort order
If strCourseSortOrder = "Descending" Then
strCourseSortOrder = "Ascending"
Else
strCourseSortOrder = "Descending"
End If

strSQL = "SELECT * FROM tbl_CourseList"
strSQL = strSQL & " WHERE Course_Year = '" & cmbYear(1).Text & "'"

Select Case strCourseSortOrder
Case "Ascending"
strSQL = strSQL & " ORDER BY Course_Date"
Case "Descending"
strSQL = strSQL & " ORDER BY Course_Date Desc"
End Select

lvwCourseListYear.ListItems.Clear

rs.Open strSQL, cn, adOpenForwardOnly, adLockPessimistic, adCmdText

Do While Not rs.EOF
'add to listview
Set lvwItem = lvwCourseListYear.ListItems.Add(, , Format(rs.Fields("Course_Date").Value & "", "dd - mmm - yyyy"))
lvwItem.SubItems(1) = rs.Fields("Course_Day").Value & ""
lvwItem.SubItems(2) = rs.Fields("Course_Type").Value & ""
lvwItem.SubItems(3) = rs.Fields("Course_Venue").Value & ""
lvwItem.SubItems(4) = rs.Fields("Course_Times").Value & ""
lvwItem.SubItems(5) = rs.Fields("Course_ID").Value & ""
lvwItem.SubItems(6) = rs.Fields("Course_Checked").Value & ""
ctr = ctr + 1
rs.MoveNext
Loop

rs.Close

lvwCourseListYear.Sorted = True

Case 2
'Check if the Sortkey is the same a the current one
If lvwCourseListYear.SortKey <> ColumnHeader.Index - 1 Then
lvwCourseListYear.SortKey = ColumnHeader.Index - 1
lvwCourseListYear.SortOrder = lvwAscending
Else
'If the column is already selected then change the
'sortorder to be the opposite of what is currently used

lvwCourseListYear.SortOrder = IIf(lvwCourseListYear.SortOrder = lvwAscending, _
lvwDescending, lvwAscending)
End If

lvwCourseListYear.Sorted = True

Case 1, 3, 4, 5
Set rs = Nothing
Exit Sub
End Select

Sorting Array With 2 Columns
Hello, in my game I have the high scores. They are stored as the Players name and then the score, like;
Kevin,2548
Peter,36982

When someone ends the game, I would like loop through the ini file used to store the high scores and read them into an array or listbox, the latter so I can make sure its working).

So i would have the first 10 fields filled with the data and then i will make the 11th the new entry. I would like to sort them by the score and then name and then write the first 10 back into the file, dropping the 11th since it would then be the last one.

using either an array or a listbox would be fine.

Sorting Listview (2 Columns)
Hi !

Is it possible to sort a listview by 2 columns ???

I want that my app sort the 1st Columns and sort the 2nd Columns without modifying the order of the 1st column...

I try this but It does'nt work


VB Code:
ListView1.SortOrder = lvwAscending  ListView1.SortKey = 0  ListView1.SortKey = 1

Thanks in advance !

Sorting Listview Through Columns ???
ok i open a text file that is spilt up like so ...

MyItem.Text & Chr(9) & MyItem.SubItems(1) & Chr(9) & MyItem.SubItems(2) ' & " " & MyItem.SubItems(3)

Now i open it in the listview and it reads it fine, that is if i don't have the sorting checked off. if i have it to sort its missing some data on the second and thrid colums

I want to be able to sort the listview by clicking on the colums i searched the forums and got this but... its still giving me the same problem... missing data

here's the code I've got...

Private Sub SingersListView_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
If SingersListView.SortOrder = lvwAscending Then
SingersListView.SortOrder = lvwDescending
Else
SingersListView.SortOrder = lvwAscending
End If
SingersListView.SortKey = ColumnHeader.Index - 1
End Sub

can anyone wite the code for this that would show all my data. i'm using vb 6 with windows common controls 6(sp6). thank you

MSFlexgrid - Sorting Columns On The Fly
I have an existing MSFlexgrid control that displays data.

Is there a way to click on top of a column and have the column sort the data?

Click once and have it in ascending order. Click again and have it descending order.

Any code or clues would be appreciated.

Sorting MSFlexGrid On Two Columns
Hi all,

How to sort a flexgrid on two columns.

Sorting ListView Columns
Numeric values in the ListView column are sorting ASCII.
How do I sort numerically when I click the column?

Sorting Columns From Listview
Hi
, Urgent
Please, how I sorting the listview in the columns ?

eg: I have

hour_ini hou_fim room
18:20 18:50 1
18:50 19:20 1
07:00 07:30 2
07:30 08:00 2
06:00 06:30 3
Is sorted for room , I want sort for hour_ini, How do I ?
07:00

Sorting Columns In Grid
<html><div style='background-color:'><DIV></DIV>
<P>Hi Friends,</P>
<P>I would like to sort on any one of the columns simply by clicking on the column header in Sheridian DB Grid.</P>
<P>Can anyone please let me know,</P>
<P>Thanks,</P>
<P>VKT<BR><BR><BR><BR><BR><BR></P>
<DIV></DIV></div><br clear=all><hr>Talk to Karthikeyan. Watch his stunning feats. <a href="http://g.msn.com/8HMBENIN/2731??PS=">Download images.</a> </html>

Sorting By Two Columns In A Flexgrid
Greets,

I know how to sort a flexgrid by one column using the flexSortGenericAscending/Descending method, but if I have a grid that has two columns, say "Name" and "City" and I sort by the "Name", then the city is out of order, and if I then sort by "City" then names are then out of order. Is there some way to sort this so that when I sort by "City", all the names for that city are also in order?

If I'm not being clear, let me know. I'll try to explain it better.

Sorting Two Or More Columns With A DBGrid
Hello,

Is it possible to sort multiple columns at the same time with a DBGrid HeadClick event? The HeadClick event with a DBGrid takes only one parameter. I would like to use the HeadClick event rather than using a SQL text such as

SELECT * FROM Clean ORDER BY OPER_NBR, TASK_NBR ASC

to sort the data.
If it were possible, any help would be much appreciated.

Thanks

Karl

Sorting Columns In Grid
Is there a grid that you can transfer columns from one place to another during run time and sort columns from ascendint to descending also during run time?

Matching List View To Tree View
Hi Everyone,

Quick Question. I have a list view and a Tree view that are sharing the same data. The Tree view control lists all the Task Names and the List view control has the task detail. (Start, End Date and resources.)

The only issue is that the Line widths do not match. The Tree View nodes have more white space between them then the list view. Is there a way that I can match the width of the tree view rows to the rows on the List view?

Thanks
BDS

How Can I View The Data From A Table In List View?
Please let me know how can I view the data from a table in List View?

How Can I View The Data From Table In List View?
Please let me know how can I view the data from a table in List View?

List View, Tree View Controls
I have had the same problem... I ended up righting my own controls so that it would run faster on the population of the control...

Sorry
Brooke

Sorting Columns In An Excel Spreadsheet
Hello everybody,

I am having some trouble sorting excel spreadsheet columns from a VB application and was hoping somebody could help...

Here is what I am doing:

dim xlApp as Excel.Application
dim xlBook as Excel.Workbook
xlBook.Worksheets(1).Range("A1:C14").Select


and so i want to sort ascending on column C (with all the data in columns A and B still matching the data in C, hence the select of the whole thing), and the command that the macro recorder gave me was:

xlApp.Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

which I know may not be the same thing I need because it is VBA, not VB. I have tried a couple of different things (such as using "Cells" and specifying the entire range), but keep getting this error:

Run-time error '1004':

Method 'Range' of object '_Global' failed



Can anyone help me out and let me know what I am doing wrong, or shoot me a sort command that works in VB?

Thanx a bunch in advance!

ralph m.

Excel VBA Help - Sorting All Columns Independantly
I have an Excel sheet, 4000rows, 100 columns, and I can't figure out how to write a clean macro that will sort all columns independently. Data in each column is not at all related to data in other columns. Fyi, I do have headers in the first row. Thank you very much. If I wasn't clear, please feel free to ask questions. Dan

Sorting Auto-filtered Columns
One of my first VBA projects required the ability to sort columns that had auto-filters already applied. Since I couldn't find any examples at the time, I rolled my own:
http://www.mrexcel.com/forum/showthread.php?t=50966
Sorry about my lack of knowledge of code tags at that time, and that I didn't make it more generic or comment it. To be honest, sharing and discussing code with others was a foreign concept to me at the time.

It seems to me this should be a common thing that one might want to do. Strangely, I thought I had originally posted the code on this site, but I see I was wrong. If anyone has seen this done before, or has other ideas, let me know. If it is unique, by some stroke, I would be happy to clean it up and place it here.

Sorting Listview By Multiple Columns
Is it possible for a listview to sort by multiple columns?

I.e Click column A then B and the listview will sort primarily by column B and any duplicated results will be sorted by column A?

E.g.

Code:
'From this,
ColA ColB
1 C
3 B
2 B
4 A
' User clicks ColA then ColB
' Would get sorted as

ColA ColB
4 A
2 B
3 B
1 C

At the moment it seems to just sort by the most recently clicked column with no clear previous order (if it should already do this then maybe to do with the custom ordering functions i'm using)

Cheers

FlexGrid Sorting/Rearranging Columns
I think I finally figured out how to use the FlexGrid control. I have been told that you can’t sort by column in a FlexGrid, but there is a .Sort property. I was wondering how to use that property. I saw the constants in the Object Browser, but how do I apply the property to a certain column? Or can it only be applied to the left most column? In the Object Broswer it says is sorts selected rows, does that mean I can’t sort the entire grid by column?

Which brings me to my next question: how do I rearrange columns? Like if someone drags a column heading to the other side of the grid I want it to drop there and all the text in that column to move with it. Would I have to manually write all the code including rewriting the whole text matrix?

Also, how do I get the text in the upper cell of a FlexGrid to be left aligned?

Sorting Columns In Msflexgrid (RESOLVED)
Hi there...

I'm trying using an MSflexgrid and I would like the grid to automaticly sort the columns once I clic the header...

Do you guys have any good code for that?..

Thanks in advance

Help On Sorting Listbox (Columns Spacing Etc)
Ok thanks you to the people who answered my previous thread on adding an item from one list box to another. However I now need help on organising this data so that it is nicely presented. As explained in my original thread I had an extremely long sentence of stored code which was placed inside a random access file (this sotred the users details such as there address, postcode etc).

However now that I that I can add a single record from the main list box (Lst_Users) to the second list box (Lst_Details) I want this data to become organised (in the second list box). Is there a way of restricting a certain amount of characters per line in a list box. This way I could forcefully seperate the long line of code in the list box. Any other ideas of seperating this long string would be welcome, thanks in advance.

Sorting A Listview W/ Multiple Columns..
I have two columns in my listview, and I want to sort by either column.

If I clicked on the first column, it would sort alphabetically by the first column, and same for the second.

Any help? I'm confused

Copyright © 2005-08 www.BigResource.com, All rights reserved