Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a grid set up with a bunch of columns and rows. Right now im able to double click a cell and create a new frame. But I would like to capture the row data on the double click and display that in the new frame. I understand how to create a new frame and display data in it, i just need help in capturing the row data on the double click
was able to achieve this by using GetCellValue(); in wxWidgets.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am using aws dynamodb.
Let's say I have a slideshow gallery like below.
There are only 3 columns in my Table "Banners" which are id, createAt and url.
I can use upload button to upload photo.
When I press upload, 2 api will be called.
The first one is to create photo and store it at aws s3 bucket and then return the url, and the second one is used to store the url in Table "Banner".
Now I've come up a new design as below.
Every time I upload photo, it will show in "inactive banner".
The "Active Banner" will be shown in the slideshow at the top.
I can drag and drop the photo from "inactive banner" to "active banner" and vice versa.
Also, the order inside "active banner" can be changed by dragging to different position.
Every time I make changes, I need to click save to call api(PATCH/PUT) and make it work.
I have a few questions for the design.
1.Do I need to add more column in my dynamodb or new table? If yes, what should I do?
2.When I create/update banner, what actions should I do? I am not sure how to make it work by make http request.
As it is one-to-one data ; so need to create multiple tables. Simple design would be to add two more columns in your table :
boolean activeOrInactive
int order
whenever you create banner; u would continue doing whatever u are right now along with default values of these two new columns also. During update banner; u will just update those values.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What would be better Logic approach to setup recurring Order modelling.
There is Order model with tons of Order information along with
o.recurrence_unit
o.recurrence_period
These ones are already calculated:
o.expire (date )
o.days_left (number, 31)
How would you setup parent / child relationship.
The idea I was scratching with "related" field back to original Order model. There is a possibility, the child recurring orders would need an model to themselves. Email reminders need to be sent to.
Tree-node-like models could be represented database-wise with a "parent" field pointing to the same model.
parent = models.ForeignKey('self', related_name='children')
However, caution is advised when you have to travel the "tree", as you should load from databse all instances and then travel it in Python using some sort of data structure rather than accessing your database multiple times with the antipattern some_instance.parent.parent.parent.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I generate a Timeline with data of a SQL query. I use various timesheets in the same row. The problem is, that sometimes I get same timesheet from two different query in a row, so these are in full cover. In this case I would like to see only one.
Is there a built in feature in the API to handle this situation?
Example: http://i.stack.imgur.com/KVClR.jpg
I am not certain that this will work, but you could try grouping your data before drawing the chart:
// the first array should contain a list of all of your column indicies, the second should be empty
var groupedData = google.visualization.data.group(data, [0, 1, 2, 3], []);
This will create a DataTable identical to your original, except any rows that are exact duplicates will be reduced to a single row.
It is probably faster to handle this in SQL than in javascript, though.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I'm working with a QTableView and I want add a QComboBox in the 3rd column of every cell. There will be thousands of cells so I have opted for an in place editor solution. I want the combo box to be displayed when the user enters a cell by clicking or when the users uses the arrow key to select a cell in the 3rd column.
void FixtureCalibrationPage::on_View_clicked(const QModelIndex & index)
{
if(!index.isValid()) return;
if(index.column() != 3) return;
if(selected_table_row == index.row()) return;
if(selected_table_row != -1) { //clean up
ui.view->setIndexWidget(index, NULL);
}
selected_table_row = index.row();
ui.view->setIndexWidget(index, &m_combo_box_selection); //set the
}
Click does not cover the case of using a the arrow keys. Is my only option to manually check if the users pressed the Arrow key or does another solution already exists?
That's what delegates are for. Create a delegate object for the view and set it on the 3rd column by using setItemDelegateForColumn. Note that delegates must not be shared by multiple views. Each view needs its own delegate. It makes sense for the delegate to be a child of the view.
In your delegate, you will create the combo box in the implementation of createEditor method. You of course need to implement setEditorData, setModelData, etc.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
For example: I have 2 lists (company and workers)
I would like to make a worker list view that will display all needed worker data + company.name + company.id
I know lookup field will display one specified column, but how can I bind another one to same lookup?
Thanks...
When you are creating the new lookup column in your workers list, it would ask you for the list from which you want to lookup (company in our case).
After that you need to specify which column's value you want to use as lookup value (this is the one specified column that you have said in your question).
Underneath that it would show a list of all columns available in the looked up list.
Select all columns that you want to show from your looked-up (company) list into your (worker) list view.
Note: dont think that now you would be asked for values of all these other selected columns when you are creating a new (worker) item. It would only ask for the primary column value (company title in our example). The other selected columns are only for display purpose and fetch values directly from looked-up list item.
You can also find my detailed blog post on this matter here.