groupdatamodel not taking in given order - database

The problem i am facing is that the data listed in list view is in ascending order in BB10. I have read from blackberry site that group datamodel will display data either in desc or asc order.I really want them to be displayed in list view in the order they are in database.
Please help me.

If you have an id field in your database, you could use it to sort your items.
But I guess you shouldn't be using a GroupDataModel if you don't want to group your data (if you don't sort it, how can you group?). What you need is probably an ArrayDataModel, or your own DataModel subclass.

Related

How does firestore order documents

I have recently started a firestore database. I was wondering is there any order in which the documents are added? is it just in the order they are created in?
There is no inherent sort order in which documents are stored, but you can specify the sort order you want to retrieve them in through the API. The documentation also contains a full table on how data is sorted.
If you're asking about the Firestore console, that by default orders the documents on their IDs, but you can change that by clicking the filter button at the top of the list of document IDs.

How to handle Multiple check-boxes in Reactjs?

"I am really stuck in this problem for past 1 week. Actually I am getting an array of strings from the API that contains the ID of employees. Now I am showing it in a table and it contains check-boxes before them. Now when I sort the Admin ID column, the Admins get sorted out but the check-boxes are left in there original position."
So I want a solution where both the Admin ID and check-boxes move simultaneously with each other on sorting that column.
I will attach some screenshots of the table so that it will be easy to understand the problem"

group by rows to get the distinct row using filter in admin-on-rest

Thanks in advance, I wanted to know is it possible to get distinct rows from db using the filter in admin-on-rest.example, for example, I want to show a list of distinct offers running but in my database, I have the duplicate offer, is it possible using filter component in admin on rest.

How to make title sortable with two different tables whose data coming from same model in cakephp?

I have a view showing two tables which data is coming from same model but based on different column status I divided in 2 tables. Problem is, when I click on top table's column name heading for sorting, it also sort the bottom tables. I'm wanting the bottom table data won't sort when I click on top table column heading title. If any one have a good solution, would highly appreciated.
This highly depends on your setup, but you're going to have to do some custom code.
For example, don't allow Cake to sort for you. See what the links look like when created by Cake, then write your own, and include an additional variable &table=1 or something.
Based on the sort variable and the table variable, build your pagination options for each including the correct sort you want for each group separately.
Another option (depending on how large your data sets are) is to use javascript datatables.

Adding an order for a customer selected from a list view in Access

I followed this great guide to help me add a search feature to my Access database:
http://www.techrepublic.com/blog/howdoi/how-do-i-populate-an-access-list-control-with-the-results-of-a-dynamic-search/108
At the end it says:
"If you’re building a quote or order, use the list control’s Click or Double Click event to copy record(s) to a temporary table. It’s easy to implement using a fixed query for each search task."
I have managed to display all search results in a list box and I would like to be able to click on a customer to highlight them, and then press a button to add an order to the selected customer. I've been thinking how I could do it and I really can't get my head around it.
Any help would be appreciated.
It depends on how you build your database. My guess is that one easy way would be:
Create a table with customers;
Create an "Order" table with orders where you link the customers through a foreign key
You load the customers in a listbox. While making the name visible, it is actually the ID that you retrieve when clicking the listbox. You can configure this via the wizard in the design view of a table. You can make other forms appear by events on the listbox (eg. on click).
If you managed to retrieve the ID of the customer, and you have the data related to the order (data that can easily be extracted from form objects and loaded into variables ) what you need is an insert statement and insert the values in the "Order" tabel (including the customer ID, which is linked through the foreign key).
This way all order records are linked to the customer and can be queried later.
Due to my limited knowledge on your other requests, I cannot help you any further on the rest of your database design.
I hope that my reply could help you and that I understood your question correctly.
You can access info from a listbox via:
List.Value
Or if it is not the first column then:
List.Column(0,0)
0 being the column and row references.
You may also consider using a listview over a listbox and then you can access the relevant parts of a listview control with the following code:
ListView.SelectedItem
Or if it is not the first column then:
ListView.SelectedItem.SubItems(3)
3 being the column reference

Resources