c# - HowTo reorder items in DataView object -


I have a dataview object with productID and productName, I get all the items from the product table and store them in cache I want to receive items that the consumer has purchased so that they are included in the purchase or tables without using any other query.

Meaning Product Data View 1. Foo 2. Foo 2. 3. Fu3

Filter the product by using Rob Filters (in Manufacturer (1,3)) User Products Dataview 1.Foo 3.Foo3

The user has now purchased Foo3 first, how do I reorder items based on the correct (chronological) array. I.e. 3 1

thanks

Here is the datawave. Source:

  Private Zero SortByTwoColumns () {// Get a DataTable's DefaultViewManager Datatyview View = Datatile 1. Default view // By default, the first column sorting ascending. See. Location = "state, zipcode dessc"; }  

From your original post, it seems that you only have product ID and product name. You can not sort them into these storage, as long as you are not retrieving the date of purchase / order.

Perhaps the simplest thing is that you are already using the date column (purchase) in your SQL statement, then see a . Server = "purchase-date dessc";

In this way, you do not have to type any other statement or else to hit the database this way.

EDIT: Detorues are integral and string indexers. Ex:

  foreach (data row in data entry) {var value = line ["COLUMN_NAME"]; }  

The column is stored as an object, so you have to do a redundancy check and convert it to your data type


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -