sorting

.net grid to display rows, and also have option to group by

Hi, Does the gridview have any 'group by' functionality? I need to display a table in the gridview, then allow for sorting on all the database table columns. I also need to be able to 'group by' on some columns. Any examples of this kind of functionality? ...

Filtering a collection of items from contents of another collection.

This used to work for me and then it failed. I want to return only those items that contain all the filters, not at least one filter as it is doing now. WHat is wrong here? private IQueryable<IndexItem> FilteredIndex (IQueryable<IndexItem> index, IEnumerable<string> filters) { var filteredIndex= from f in filters.AsQueryab...

Sorting MultiValue data numerically OR alphabetically - LINQ to SQL and C#3.

I am having a problem giving a LINQ predicate the knowledge it needs to sort either alphabetically or numerically. I am working with a multi-value pivoted set of data with has a sortable column. The column is always stored as varchar in the DB, however, it has lookup knowledge of what that data type actually is. To simplify, in additio...

table sorting in groups

Hi all, I have table with folders first and then documents.I want to sort such that sorting applies to both the folders and documents but want to keep sorted folders first and then sorted documents.Is it posible with jQuery table sorter.I am looking forward to hear from. Thanx in advance dushyant joshi ...

list.sort not working in vb.net

Hi all, I have a slightly odd problem that I think is most likely due to an act of foolishness on my part, but for the life of me I (and other members of my team) can't see it. I have an object that contains a generic list property which I would like to sort. I have written a comparer class to do this for me and I am calling it in the ...

UITableView with "multiple column": need sort

Hi friends, I have an UITableView with "2 columns" showing the content of 2 different "unlinked" arrays. The second array is dinamically updated. My question is: How can I sort the 1st array (actually a dictionary of arrays) using the content of the second array? ...

How to sort an XML file using .NET?

So you have a third-party web service that likes to abuse XML and return things in an order that makes your programming a complete pain in the neck. For example... <file> <node1>Foo</node1> <price>4.99</price> <node2> <key>XX999</key> </node2> </file> There are about a thousand of these sorted in order by price. How can ...

Sorting Numerical Data Alphabetically

Are there any situations where it's useful to sort numerical data alphabetically? for e.g. 111 12 2 when sorted in ascending order,give: 111 12 2 ...

How to sort List<List<string>> according to List<string> number of fields?

Hi, How do I sort List<List<string>> according to number of fields? The list got structure like a|b|c|d|eeee|rere|ewew| ewqewq|ewew| ewew|ewewewewew| By Sort I'd like to do it according to numbers of blockes (asc/desc) EDIT the <list<list<string>> is "items" and I access each list by items[0] each of these items[xx] is a list wh...

Gridview Sorting With Images

Hi, I have a web app(ASP.NET 2.0 with C#), and in it I have a gridview that gets its data from an oracle database. I needed to implement the sort function for the gridview, so I added a dropdownmenu right above the gridview with 2 choices: Ascending and Descending. Then in the Gridview_Sorting method, I have a switch statement that ba...

Flex Datagrid Sort Stopped Event

In Adobe Flex, when user presses and releases Mouse on a column header in a Datagrid, the corresponding sorting function for the column is called. Is there a way to figure out, when does the sorting stop? Basically, there is a column "Serial Number" in the datagrid, which I want to relabel, when the sorting for a particular column happen...

Best Way of Having End User Specify Sort Order in Rails

I am looking for a suggestion on the best way of having an end user from a Rails application's view files set the sort order of a result set returned by a model's "find" method. In other words I would like a user to be able to choose their sort order from a selection list. Initially, I thought I could just put the string that I would p...

Implementing sort and/or search algorithms - where and why

From time to time have I come across manually implemented sort and/or search algorithms, instead of using language implemented algorithms. Most source code I've been looking into is written in Java, C# or PHP - but I'd guess this phenomenon is language agnostic. Regarding regular data structures such as lists; Why and where do you imple...

How to sort List<List<UInt32>> according to List<UInt32>[0] number ASC/DESC in C#?

Hi, How shall sort this in ASC order? I got List<List<UInt32>> full of records of List<UInt32> and I want those records to be sorted according to the first column in each record - the column is UInt32 number. So: I have List of: new List<UInt32>: 32,1,1,1,1,1 new List<UInt32>: 22,2,2,2,2,2 new List<UInt32>: 32,1,1,1,1,1 new List<UIn...

Default sort-ordering in MySQL (ALTER TABLE ... ORDER BY ...;)

Assume that the default ordering of a MySQL-table (ISAM) is changed by executing: ALTER TABLE tablename ORDER BY columnname ASC; From now on, am I guaranteed to obtain records retrieved from the table in the order of "columnname ASC" assuming no "ORDER BY" is specified in my queries (i.e. "SELECT * FROM tablename WHERE ... LIMIT 10;")...

ASP.NET Repeater Paging/Sorting

So what's the real story on how to do this. All of the examples I find use Default Paging (HOW does anybody find that acceptable???) but I want to use custom paging. I can't use a GridView because I need more flexibility. The examples I see all use the PagedDataSource class but I can't find one that uses Custom Paging. Am I doomed to...

Sorting by month in MS Access

I am using an MS Access db to track some tasks during the year. Each task has a due Month. I do not want to use exact dates as the convention in my team is to refer to the month. I don't want to store the dates in a date format as team members will be entering the due month by hand. Is it possible to sort my fields in date order if the ...

Groovy: How do I sort an ArrayList of String:s in length-of-string order?

How do I sort an ArrayList of String:s in length-of-string order in Groovy? Code: def words = ['groovy', 'is', 'cool'] // your code goes here: // code that sorts words in ascending length-of-word order assert words == ['is', 'cool', 'groovy'] There are certainly more than one way to do it - so I'll grant the answer to the person who ...

Sort WPF ListBox on button click?

First off let me just say I'm very new to coding so there are big gaps in my knowledge... anywho: Right, I'm trying to sort a WPF listbox when a button is clicked, preferrably in pure xaml (otherwise VB). I'm having a hard time seeing as most samples are written in C#. Here's my code: <Grid.Resources> <CollectionViewSource x:Key...

How do I sort records in a text file using Java?

Some amendment of the data in txt file. I have tried the suggested code but Im not successfully write it again in the txt file with this format.I've tried the collection.sort but it write the data in long line. My txt file contain these data: Monday Jessica Run 20mins Alba Walk 20mins Amy Jogging 40mins Bobby Run...