I'm using a gallery to display a list of names I've selected inside the gallery I've inserted a combobox with a bunch of work task codes, this is being saved into a local collection.Gallery with combobox
when I close the app and re-open it the combobox that is beside each name no longer shows the assigned task code.
I have tried placing the task codes in both the DefaultSelectedItems and Items but can not seem to figure out how to retain the selected code once I reopen the app.
I have a save button with the following Clear(Myteam); ForAll(Gallery_team.AllItems, Collect(Myteam,{Position:ComboBox_position.Selected.Value})); SaveData(Myteam "Savedteam")
The use of SaveData is to locally make a save-file of the current state of your collection. It's local, on the device, and not saved somewhere on-prem/cloud related.
If you want to get your SavedDta back into your app, you need to use LoadData first, otherwise the data will stay outside.
For your application, its more wisely to patch it to, for example, a SharePoint list or an excel sheet.
Related
I have been struggling to see this behavior for past few weeks where the angular JS model has been updated but the UI doesnt get reflected in the multi select box.
Absolutely no errors and the data model has all the values it needed . I tried reloading controller and also doing a refresh inside controller to take changes.
tried $scope.$apply() as well and its of no use. If anyone from angularjs team is ready to take a look, we can discuss over call and i can share more about the code. Unfortunately due to sensitive information i cannot copy paste the code here.
editing main question:
example: I have an object something like this. var clusters = { available: [], selected: [], } and have 2 multiselect controls. One will show all the available ones and when user selects one it will be pushed into selected list to display in second multi select control . for the first time when page loads, if the user already selected anything, I will get this data from db. and try to display to the user what he selected previously. This is where , angularjs doesnt bind the values in the selected list when shown. The UI doesnt reflect i even though i successfully added the list in the array(selected).
I'm using ExtJS 5.1.3, I have a grid which is loaded from a store which has a model. The grid is set to use plugin roweditor, so I edit a cell and give it a new value, at this point the red tick is shown that the cell has been changed.
I have a Save button which when clicked gets the store.getModifiedRecords() and passes these off to a ajax request, upon success of this request a few things happen and the last action I do is to load the grid store again which then populates the grid again with the latest version of the data, this is fine and seems to be working as expected.
As this is a multi page application I also have a check when a user navigates away from this page, this is to catch any unsaved grid changes, so basically I get any form from the page and verify the isDirty() value, this is where I am finding my issue, the roweditor is being returned as dirty, this is because some columns have an editor and ExtJS uses form validation on these fields,
I can't understand why the store loading again has not cleared any dirty fields associated with the grid columns? I've tried a number of things such as clearing the store prior to ajax request along with refreshing the grid view, I've tried committing the store changes prior to doing the ajax request but each time I try navigate away from the page after a grid save I pick up the roweditor as having dirty fields :( any help is greatly appreciated.
EDIT: managed to replicate on a simple fiddle
https://fiddle.sencha.com/#view/editor&fiddle/1rmf
The fiddle is basic, to replicate follow these steps;
edit first row age, change age to 13
click Save (i'm forcing the store to load data which has the change we've made)
click 'Check roweditor is Dirty() value' button to see the value of the roweditor isDirty() function, this will return true
if you look at the button handler, you can drill into forms[0].items.items[2] and see that this field has dirty: true which is why isDirty() is returning true.
SOLUTION
As explained in accepted answer, the roweditor is not affected by the store edit/cancel or load in my case. What I did when clicking on 'Save' was to get the grid, then the editor and it's form and called reset() on this so effectively sync everything again.
grid.editingPlugin.getEditor().form.reset();
you can also get access to plugins via grid.getPlugins() which returns an arrary
updated fiddle to show it working
https://fiddle.sencha.com/#view/editor&fiddle/1rmr
During the editing process grid will eventually call loadRecord on the editor's form. However the editor's form is not cleared upon editing success or canceling. That is why your check for dirtyness returns false.
Grid reloading the data is not destroying the editors. It is an optimisation. Editors are created only once and they are destroyed along with the grid.
I'll try to answer regarding to an experience of mine with an all ExtJS desktop application.
By the way looking quickly over your description, you may have to call the Store.sync() method that refreshes your store.
Looking more deeply, there are many way to make CRUD using ExtJs.
I've been made using the "instance" of store but at certain point I had to change it to static calls like MyApp.store.Model.save() etc. That makes you have only one instance of the store avoiding dirty data.
Here's my project folder if you need
https://github.com/guilhermeribeirodev/grizzlyboilerplate/tree/master/src/main/webapp/js/MyApp
I have just started using visual studio c++ (2010) with windows forms, but have cannot for the life of me find out how to create new UI items in response to events. What I would want to happen is click a button, and have a new row, with a couple of text boxes and buttons appear, with onebutton to delete the row if I keep clicking, more rows will appear, named row0, row1 etcv. I looked at this page, (http://msdn.microsoft.com/en-us/library/aa984255(v=vs.71).aspx), about adding controls programmatically, but when I add a new text box inside a click event, the text box is only created inside the scope of the event (as expected!), but I want to be able to create it insde the newRow click event, but access it and . I thought of making a 'row' class, with row.text and row.deleteButton properties, and at each creation of a row, respective events will be created for button clicks and text edits.
Is there anyway to do this, ie a function that can be created that creates new objects by passing the required name?
The trick for this to work is that you need to have declarations outside of the event handler to keep track of the newly added UI components. In the link you've given the added TextBox is locally scoped within the event function, and this will be removed from the heap (i.e. memory) when the event is finished.
So one solution would be to add a list of UI components to your form, and then have the events add to or remove from this list of components. To get this solution working you possibly need to read up on lists of objects (or possibly dictionaries) and how to handle these.
Sorry for a rather general answer, but the question is also very broad... :)
We have a rowediting plugin on grid where a button of one trigger field changes some other values of the record (we are loading some remote data which get applied to the record). The values that get changed in background are most commonly not editable, so they are just rendered. Basically the remote loading of the data works fine, meaning the record get changed and all data get save but we have the following problems:
1.The rowediting plugin does not show the changes that where applied to the record fields
2.Setting the changes via record.set() cause the store to sync immediately and not on clicking the "save" button of the editor.
So how can we make the editor to show the changes applied in the background and how can we apply these changes in a way so that they get saved along with the other edited fields.
Thanks in advance for any help!
This should not be that complicated, you just need a reference to your active editor instance. You can then either
reload the record into the form by calling loadRecord() again. But note that this may overwrite any changes that where made by now within the editor
or (for the second way I expecting the values to be exactly the same as in the record in manner of key:value definition - short: no special mapping is required)
apply the new data to the record by calling either set (note that this will trigger sync if you have autoSync turned on) or by using Ext.apply(recinstance.data,newvalues) and editorinstance.getForm().setValues(newValues)
I am building a prototype in SketchFlow using a sample data set. When I run the project I can see lists of values no problem but anywhere I have used details mode to display a single record the running project is blank. The data is displayed within Expression Blend (it picks the first record in the set) - the only thing I can think of is that the binding needs to refer to a specific record but I can't see where to set that.
I found the example in this tutorial works fine:
http://blogs.msdn.com/canux/archive/2009/06/29/mini-tutorial-blend-3-visual-data-binding.aspx
Create your sample data source
Click on the 'list' mode button above the data source (in the 'data' tab)
Drag field(s) onto a list view for the list selection
Click the 'details' mode button above the data source (in the 'data' tab)
Drag the other field(s) onto the area where you want to display the details
Voila! it works! Or, at least it works on my box ; )
OK, I found a clunky answer. You can put a linked master control on the page with the relevant default value and then collapse it so it's not visible. Does the job but not particularly elegant.