Search Results

Search found 1765 results on 71 pages for 'sorting'.

Page 12/71 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Sorting, Filtering and Paging in ASP.NET MVC

    - by ali62b
    What is the best approach to implement these features and which part of project would involved? I see some example of JavaScript grids, but I'm talking about a general approach which best fits the MVC architecture. I've considered configuring routes and models to implement these features but I don't have a clear idea that if this is the right approach to implementing such features. On the one hand, I think if we put logic in routes (item/page/sort/), we would have benefits like bookmarking and avoiding JavaScript. On the other hand if we use JavaScript grids, we can have behavior like the old school grid views in ASP.NET web forms. I find that using HTML helpers may be useful for paging, but have no idea if they are good for sorting or not. I've looked at jQuery, tableSorter and quick search plug-ins, but they work just on the currently-fetched data and won't help in real sorting and filtering that may need to touch the database. I have some thoughts on using these tools side by side with AJAX to get something which works, but I have no idea if there are similar efforts done yet anywhere. Another approach I looked at was using Dynamic Data on web forms, but I didn't find any suggestions out there as to whether or not it is a good idea to integrate MVC and DD. I know implementing filtering and sorting for an individual case is simple (although it has some issues like using Dynamic LINQ, which is not yet a standard approach), but creating a sorting or filtering tool which works in all cases is the idea I'm looking for. (Maybe this is because I want have something in hand when web form developers are wondering why I'm writing same code each time I want to implement a sort scenario for different Entities).

    Read the article

  • Sorting/grouping when there are multiple values in one cell

    - by ngm
    I have an Excel 2007 spreadsheet, where each row of the dataset describes a feature of a piece of software. One of the columns in the spreadsheet is Relevant Users, which describes which users of the software the feature is of interest to. There may be a couple of different users interested in a feature, in which case I've been filling in the cell with the two user types separated by a colon, e.g. 'Usertype A; Usertype D'. Occassionally, I'd like to sort my data by the Relevant Users column. However, the way I'm populating the column means the sorting isn't very smart. If I have a feature where 'Relevant Users' is 'Usertype A; Usertype D', and then I sort by Relevant Users, that feature will be grouped at the end of all the other features of relevant to Usertype A, as it's just sorting alphabetically. But I want it to be listed in the two separate groups of Usertype A and Usertype D. Or, if I have a pivot table that groups the features together under the heading of Relevant User, I'll get all the features for 'Usertype A', then 'Usertype B', then 'Usertype C', then 'Usertype D', then 'Usertype A; Usertype D', etc. Whereas I really want a feature with Relevant Users as 'Usertype A; Usertype D' to show up in both the Usertype A group and the Usertype D group. I guess if this information was in a database I might have a many-to-many table linking Relevant Users to features. But is there a way to go about having this kind of many-to-many relationship in Excel?

    Read the article

  • SQLAlchemy custom sorting algorithms when using SQL indexes

    - by David M
    Is it possible to write custom collation functions with indexes in SQLAlchemy? SQLite for example allows specifying the sorting function at a C level as sqlite3_create_collation(). An implementation of some of the Unicode collation algorithm has been provided by James Tauber here, which for example sorts all the "a"'s close together whether they have accents on them or not. Other examples of why this might be useful is for different alphabet orders (languages other than English) and sorting numeric values (sorting 10 after 9 rather than codepoint order.) Is this possible in SQLAlchemy? If not, is it supported by the pysqlite3 or MySQLdb modules, or for any other SQL database modules supported by python for that matter? Any information would be greatly appreciated.

    Read the article

  • jQuery: Sorting hierarchical data?

    - by Industrial
    Hi everybody, I have tried for some time to work out a way of sorting nested categories with jQuery. I failed to build my own plugin to do this, so I tried to find something that were available already. Tried a few hours now with this one, http://www.jordivila.net/code/js/jquery/ui-widgetTreeList_inheritance/widgetTreeListSample.aspx and cant get it to work. What are the alternatives of creating a jQuery / jQuery UI script that handles sorting children and parent categories in a way that can be combined with a AJAX PHP backend to handle the actual sorting in the database? Thanks!

    Read the article

  • pivot table / chart default sorting

    - by Prince Charming
    What is default sorting for excel 2010 pivot table and charts I have a "Year month Week" column in my data sheet which I am using as row label, excel pivot table renders it arbitrarily like in data sheet I have data in the following order 2010 October Week 1 2010 September Week 1 2010 September Week 2 2010 September Week 3 2010 September Week 4 but when I use this in pivot table it generates row labels as 2010 October Week 1 2010 September Week 3 2010 September Week 2 2010 September Week 4 2010 September Week 1 I want pivot table to show row labels exactly in the same order as it is in data sheet

    Read the article

  • How can I sort an NSTableColumn of NSStrings ignoring "The " and "A "?

    - by David Barry
    I've got a simple Core Data application that I'm working on to display my movie collection. I'm using an NSTableView, with it's columns bound to attributes of my Core Data store through an NSArrayController object. At this point the columns sort fine(for numeric values) when the column headers are clicked on. The issue I'm having is with the String sorting, they sort, however it's done in standard string fashion, with Uppercase letters preceding lowercase(i.e. Z before a). In addition to getting the case sorting to work properly, I would like to be able to ignore a prefix of "The " or "A " when sorting the strings. What is the best way to go about this in Objective-C/Cocoa?

    Read the article

  • Custom sorting on UltraWebGrid - ASP .NET

    - by Leandro Fernandez
    How can I accomplish custom sorting on the Infragistics UltraWebGrid? I've tried to hadle the SortColumn event and it works, however, whenever I click the column header, the columns are sorted via JavaScript in the website before the event is fired in the server side? How do I stop the grid from sorting in the client? Thanks, Leandro Fernandez

    Read the article

  • Sorting table data across two table sets with jquery tablesorter

    - by Peter
    I am using jquery table sorter and have two tables. Instead of sorting the data just in the first table, could there be a way to combine the data in the second table and sort both? As an example, sorting column 1 on table 1 OR 2, will result in: //ORIGINAL //RESULT TABLE 1 TABLE 1 col1 | col2 col1 | col2 1 | 1 1 | 1 3 | 3 2 | 2 5 | 5 3 | 3 TABLE 2 TABLE 2 col1 | col 2 col1 | col 2 2 | 2 4 | 4 4 | 4 5 | 5 6 | 6 6 | 6

    Read the article

  • How to set a sorting mode in Open Dialog

    - by Serg
    A user can manually sort files in a standard Windows Open Dialog (in "Details" view mode) by Name, Date or Size by clicking on the corresponding column header. How to set a sorting mode in Open Dialog (TOpenDialog class in Delphi) programmatically in application so that the dialog opens with a preferred sorting?

    Read the article

  • Paging & Sorting grids with ASP.Net MVC

    - by Scott Ivey
    I'm new to MVC, and am not following how you'd do paging and sorting on a grid. I'm used to using the asp.Net GridView control with an ObjectDataSource pointed at objects in our business layer - and in that case the ODS handles all of the paging & sorting using the methods that our ORM generates on the objects. I've looked at using the same ORM with MVC - and things work out fine there - i just loop thru the collections to build the table on the page - but without the ODS to handle the paging & sorting, i'm confused as to how I'd handle that. Would I have a separate controller for the paging and sorting? I'm not sure what the best practices are for this scenario, so if someone can point me in the right direction it would be much appreciated. Edit: Ok, so I understand that I need to roll my own - but where do I start? I've created a CustomerController, and a view that displays a table of customers that looks like below - and I want to sort on FirstName or LastName columns. My Model has a Sort() method on it that'll take a string sort expression in the format that would be used by a GridView/ODS pair. Would I create a new Action on my CustomerController called Sort, and put an ActionLink in my header? <table> <tr> <th> First Name </th> <th> Last Name </th> </tr> <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.FirstName) %> </td> <td> <%= Html.Encode(item.LastName) %> </td> </tr> <% } %> </table>

    Read the article

  • Disable nested sorting in dojo enhancedGrid

    - by JJ
    I'm currently trying to disable the nested sorting, as it does not pass the parameters for the nested sort to the store url (only the first sorted column gets passed over). I tried to set "nestedSorting: false" in the grid setup (programmatically), but the sorting is still being showed in the grid headers. Isn't it possible to disable the nested sort?

    Read the article

  • Best way to manually sort random text files?

    - by Jane
    I have about 1000 text files and I need to view each, and move it to a folder if it's the correct one. I can only do basic sorting by length/size, and I can't grep because the text is random. How can I do this besides manually openiing + saving each in gedit. I'm on Ubuntu Linux. Thanks

    Read the article

  • How can you Merge sort a .Net framework LinkedList (of T)

    - by Andronicus
    There's a few questions discussing Merge sorting a LinkedList, but how can I do it with the C# LinkedList? Since the LinkedListNode Next and Previous properties are read-only most of the in-place algorithms I've come across are not possible. I've resorted to removing all the nodes, sorting them with a .OrderBy(node = node.Value) and then re-inserting them into the Linked list, but it's fairly crude.

    Read the article

  • Funky mail sorting and grouping in Outlook 2007

    - by laurie
    In outlook 2007 I group mails in a folder by subject with mails in each subject group sorted by Received date (newest to oldest) This works fine; I tick 'Subject' and 'Show in groups' in the context menu of the folder's table header. Life is good. But the subject groups in the mail folder are sorted alphabetically. I would like the group which has the newest mail to be the first group. Similar to how the arrange by 'Conversation' works Can this be done? I'm not averse to an add-in/macro type solution if anyone can point me at examples of implementing custom sorting in Outlook

    Read the article

  • Utility of List<T>.Sort() versus List<T>.OrderBy() for a member of a custom container class

    - by ccomet
    I've found myself running back through some old 3.5 framework legacy code, and found some points where there are a whole bunch of lists and dictionaries that must be updated in a synchronized fashion. I've determined that I can make this process infinitely easier to both utilize and understand by converging these into custom container classes of new custom classes. There are some points, however, where I came to concerns with organizing the contents of these new container classes by a specific inner property. For example, sorting by the ID number property of one class. As the container classes are primarily based around a generic List object, my first instinct was to write the inner classes with IComparable, and write the CompareTo method that compares the properties. This way, I can just call items.Sort() when I want to invoke the sorting. However, I've been thinking instead about using items = items.OrderBy(Func) instead. This way it is more flexible if I need to sort by any other property. Readability is better as well, since the property used for sorting will be listed in-line with the sort call rather than having to look up the IComparable code. The overall implementation feels cleaner as a result. I don't care for premature or micro optimization, but I like consistency. I find it best to stick with one kind of implementation for as many cases as it is appropriate, and use different implementations where it is necessary. Is it worth it to convert my code to use the LINQ OrderBy instead of using List.Sort? Is it a better practice to stick with the IComparable implementation for these custom containers? Are there any significant mechanical advantages offered by either path that I should be weighing the decision on? Or is their end-functionality equivalent to the point that it just becomes coder's preference?

    Read the article

  • PHP-How to Pass Multiple Value In Form Field

    - by Tall boY
    hi i have a php based sorting method with drop down menu to sort no of rows, it is working fine. i have another sorting links to sort id & title, it is also working fine. but together they are not working fine. what happens is that when i sort(say by title) using links, result gets sorted by title, then if i sort rows using drop down menu rows get sorted but result gets back to default of id sort. sorting codes for id & tite is if ($orderby == 'title' && $sortby == 'asc') {echo " <li id='scurrent'><a href='?rpp=$rowsperpage&order=title&sort=asc'>title-asc:</a></li> ";} else {echo " <li><a href='?rpp=$rowsperpage&order=title&sort=asc'>title-asc:</a></li> ";} if ($orderby == 'title' && $sortby == 'desc') {echo " <li id='scurrent'><a href='?rpp=$rowsperpage&order=title&sort=desc'>title-desc:</a></li> ";} else {echo " <li><a href='?rpp=$rowsperpage&order=title&sort=desc'>title-desc:</a></li> ";} if ($orderby == 'id' && $sortby == 'asc') {echo " <li id='scurrent'><a href='?rpp=$rowsperpage&order=id&sort=asc'>id-asc:</a></li> ";} else {echo " <li><a href='?rpp=$rowsperpage&order=id&sort=asc'>id-asc:</a></li> ";} if ($orderby == 'id' && $sortby == 'desc') {echo " <li id='scurrent'><a href='?rpp=$rowsperpage&order=id&sort=desc'>id-desc:</a></li> ";} else {echo " <li><a href='?rpp=$rowsperpage&order=id&sort=desc'>id-desc:</a></li> ";} ?> sorting codes for rows is <form action="is-test.php" method="get"> <select name="rpp" onchange="this.form.submit()"> <option value="10" <?php if ($rowsperpage == 10) echo 'selected="selected"' ?>>10</option> <option value="20" <?php if ($rowsperpage == 20) echo 'selected="selected"' ?>>20</option> <option value="30" <?php if ($rowsperpage == 30) echo 'selected="selected"' ?>>30</option> </select> </form> this method passes only rows per page(rpp) into url. i want it to pass order, sort& rpp. is there a way around to pass multiple values in form fields like this. <form action="is-test.php" method="get"> <select name="rpp, order, sort" onchange="this.form.submit()"> <option value="10, $orderby, $sortby" <?php if ($rowsperpage == 10) echo 'selected="selected"' ?>>10</option> <option value="20, $orderby, $sortby" <?php if ($rowsperpage == 20) echo 'selected="selected"' ?>>20</option> <option value="30, $orderby, $sortby" <?php if ($rowsperpage == 30) echo 'selected="selected"' ?>>30</option> </select> </form> this may seem silly but it just to give you an idea of what i am trying to implement,(i am very new to php) please suggest any way to make this work. thanks

    Read the article

  • Changing SQL Server Database sorting

    - by plaisthos
    I have a request to change the collation of a SQL Server Database: ALTER DATABASE solarwind95 collate SQL_Latin1_General_CP1_CI_AS but I get this strange error: Meldung 5075, Ebene 16, Status 1, Zeile 1 Das 'Spalte'-Objekt 'CustomPollerAssignment.PollerID' ist von 'Datenbanksortierung' abhängig. Die Datenbanksortierung kann nicht geändert werden, wenn ein schemagebundenes Objekt von ihr abhängig ist. Entfernen Sie die Anhängigkeiten der Datenbanksortierung, und wiederholen Sie den Vorgang. Sorry for the german errror message. I do not know how to switch the language to english, but here is a translation: Translation: Message 5075, Layer 16, Status 1, Row 1 The 'column' object 'CustomPollerAssignment.PollerID' depends on 'Database sorting. The database sorting cannot be changed if a schema bound object depends on it. Remove the dependency of the database sortieren and retry. I got a ton more of the errors like that.

    Read the article

  • Sorting array containing strings in objective c

    - by jakob
    Hello experts! I have an array named 'names' with strings looking like this: ["name_23_something", "name_25_something", "name_2_something"]; Now I would like to sort this array in ascending order so it looks like this: ["name_25_something", "name_23_something", "name_2_something"]; I guess that should start of with extracting the numbers since I want that the sorting is done by them: for(NSString *name in arr) { NSArray *nameSegments = [name componentsSeparatedByString:@"_"]; NSLog("number: %@", (NSString*)[nameSegments objectAtIndex:1]); } I'm thinking of creating a dictionary with the keys but I'm not sure if that is the correct objective-c way, maybe there some some methods I could use instead? Could you please me with some tips or example code how this sorting should be done in a proper way. Thank you

    Read the article

  • Sql Paging/Sorting - Efficent method with dynamic sort?

    - by dmose
    I'm trying to implement this style of paging: http://www.4guysfromrolla.com/webtech/042606-1.shtml CREATE PROCEDURE [dbo].[usp_PageResults_NAI] ( @startRowIndex int, @maximumRows int ) AS DECLARE @first_id int, @startRow int -- A check can be added to make sure @startRowIndex isn't > count(1) -- from employees before doing any actual work unless it is guaranteed -- the caller won't do that -- Get the first employeeID for our page of records SET ROWCOUNT @startRowIndex SELECT @first_id = employeeID FROM employees ORDER BY employeeid -- Now, set the row count to MaximumRows and get -- all records >= @first_id SET ROWCOUNT @maximumRows SELECT e.*, d.name as DepartmentName FROM employees e INNER JOIN Departments D ON e.DepartmentID = d.DepartmentID WHERE employeeid >= @first_id ORDER BY e.EmployeeID SET ROWCOUNT 0 GO This method works great, however, is it possible to use this method and have dynamic field sorting? If we change this to SELECT e.*, d.name as DepartmentName FROM employees e INNER JOIN Departments D ON e.DepartmentID = d.DepartmentID WHERE employeeid >= @first_id ORDER BY e.FirstName DESC It breaks the sorting... Is there any way to combine this method of paging with the ability to sort on different fields?

    Read the article

  • Changing MSSQL Database sorting

    - by plaisthos
    I have a request to change the collation of a MS SQL Database: ALTER DATABASE solarwind95 collate SQL_Latin1_General_CP1_CI_AS but I get this strange error: Meldung 5075, Ebene 16, Status 1, Zeile 1 Das 'Spalte'-Objekt 'CustomPollerAssignment.PollerID' ist von 'Datenbanksortierung' abhängig. Die Datenbanksortierung kann nicht geändert werden, wenn ein schemagebundenes Objekt von ihr abhängig ist. Entfernen Sie die Anhängigkeiten der Datenbanksortierung, und wiederholen Sie den Vorgang. Sorry for the german errror message. I do not know how to switch the language to english, but here is a translation: Translation: Message 5075, Layer 16, Status 1, Row 1 The 'column' object 'CustomPollerAssignment.PollerID' depends on 'Database sorting. The database sorting cannot be changed if a schema bound object depends on it. Remove the dependency of the database sortieren and retry. I got a ton more of the errors like that.

    Read the article

  • sorting extendeddatatable in richfaces

    - by user414597
    Hello All, does anyone know how exactly the default sorting works in richfaces datatable columns? (using sortby) My problem is that once a sort has been performed, the new data order is never preserved in my backing's bean data model (which makes me wonder where is this new order now stored?), that is the actual datamodel always contains just the original data.. So if say user goes to a another page and returns to what should be sorted data (using back button) , the data displays as original, not sorted.. Has anyone come across this? also, is there a way to do server side sorting, i.e. call my own sort method upon clicking the header..? many thanks for any advice!

    Read the article

  • What Windows app can sort a huge XML file?

    - by Torben Gundtofte-Bruun
    I have some enormous XML-based configuration files, with 125000 lines in them. The problem is that they are auto-generated by the system I use, and "child" tags are in a random order within their respective parent tag. This means that a diff comparison is impossible. I want to recursively sort all tags within a parent tag by the value in name="". Some parent tags only appear once and don't have a name="" parameter; these should be sorted by the tag name itself. Once the files are sorted like this, they can be compared quite easily using normal tools. We are currently using ExamXML which can match unsorted XML files, but it fails because the files are too big. Is there an application that can do this? (Windows much preferred; Linux only as a last resort) I do not want to dive into development or XSLT jobs. I am thinking that someone must have made a simple sorting tool like this already - I just can't find it using Google. Update: With help from this site, I created a small package that I want to share: XML-Sorter_v0.3.zip Update: Follow-up question here.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >