Cannot create new item in manual save mode database - google-app-maker

Trying to replicate some of the functions of the Project Tracker template, so I am using a Datasource in Manual Save Mode.
When I try to create a new item I get the following error:
Cannot create a new record on a datasource in manual save mode with
pending changes.
I tried creating a button and clicking "widget.datasource.clearChanges();" but that doesn't seem to help.
I am not sure how to clear the pending changes. Any help would be greatly appreciated.

I think I have figured it out/figured out a work around.
I adjusted all my buttons (ex: my Add Item button, my Delete button, etc.) by adding "widget.datasource.saveChanges();" to them. So now it looks like this:
widget.datasource.saveChanges();
app.showDialog(app.pageFragments.Add);
And this:
widget.datasource.saveChanges();
app.closeDialog();

Related

Putting dynamic data in QT and can selection it

I want to do the next.
I have a program that must search and show some files. Before, I will do it with a QTextEdit, searching in the system and appending it when I found one.
Now I want to to the next: I want to show the name of the files but I want to select it in the GUI and, in anohter text edit, show the first line in the document.
So, I want to transform any file in something that I can select it (like a Radio Button, a check button or something like this).
I search info in the web but I dont found anything.
Anyone knows what I can do?
Usually you use something like a list view (list of selectable items) to do this. Fortunatley Qt has one! called QListView :)
See this link: QListView
You add one entry to the listview per file (for exampe). And then when you click/select an entry this triggers an event which you can make display the contents of the file in a nearby text box.

Add filter to Add existing button crm 2011

I followed the instructions in this link
but I face a strange problem which is when the lookup is populated with the new filtered view the add button is getting disabled when I select a record from the new view !!
I debugged the code in the lookupinfo.aspx page and I found this line of code that controls whether the add button is enabled or disabled
btnAdd.disabled = (crmGrid.InnerGrid.SelectedRecords.length == 0);
and this line of code always return true despite there is a selected record !!
Can anyone help me ?
Thank you.
I followed the instructions in this link
Which link? I can't see one referenced in your question. I'll make some assumptions about what you are trying to do. I will assume that you are trying to hide an "Add Existing" button linked to a form's sub-grid. I'll also assuem you're trying to edit XML files by hand (which is the hard way!).
The easiest way to apply rules to buttons in CRM 2011 is to use Erik Pool's brilliant tool "Visual Ribbon Editor" (available here)).
To hide an "Add Existing" button based on selected records, you would:
Connect the tool to your CRM environment
Open the "parent" entity (i.e. the record type that shows the "Add Existing xxxx" button
Select the Ribbon Type to be "Sub-Grid"
Select the button you wish to manipulate
Add or edit the Enable Rules for that button
If I'm not describing a solution to your problem, maybe enhance your question - it's hard to understand what you are trying to acheive.

Flex/QNX scrolling gallery

I was hoping someone could give me some guidance on building an image gallery which loads images dynamically for a PlayBook application.I've uploaded a quick mockup of what I am trying to achieve, I want to dynamically load images into a QNX TileList or Flex equivalent and as the user scrolls through the list I want to call another 'page' of images dynamically. I have already produced an example which uses a custom cell renderer to dynamically load images but I am having problems when I attempt to identify when the user has reached the end of the list.
I have tried using the lastVisibleItem property of the list while the user is scrolling to identify if the last item visible in the list is also last in the DataProvider (so I know when I need to call for more images) but when I add images to the DataProvider it takes me back to the start of the list, can anyone tell me the reason for this?
Any advice on a different approach or how to modify the TileList would be greatly appreciated.
The scrollPosition automatically gets reset to 0 when you update the dataProvider. I've done workarounds that store the current scrollPosition before updating the dataProvider and then re-set it after the update to the dataProvider has completed. Let me know if you need some code sample and I'll see if I can dig something up.
Another option would be to use dataPaging. Here is a good example of how to do that:
http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/

ASPxGridView PopupEditForm Doesn't Reload

I'm using a modal PopupEditForm to edit rows in my ASPxGridView.
There is an image and upload control inside this form. The old image is being loaded to this ASPxImage for preview and user can upload a new image. But when user does it, even though I change the url of image to new uploaded image url, new image doesn't appear. But if I update the row, it updates the url and shows the new image next time I click to update row.
So there's a problem like PopupEditForm is not being called again. How can I solve this?
First of all, you should learn very good PopupEditForm.
Read and learn this example Grid Editing - Popup Edit Form .
Then If you can't solve your problem, and you have Devexpress licence, you should ask it in Devexpress Support
http://www.devexpress.com/Support/Center/SearchResults.aspx#cD1UNHxQNXwwc2VhcmNodGV4dD1Qb3B1cCBFZGl0IEZvcm0=
Take a look at this code central sample which you can also download and run locally:
http://www.devexpress.com/Support/Center/e/E19.aspx
Btw, Soner points to some good info too.
Thanks.

Mode is not changing in detailsview

in details view once i click edit mode. all the controls are getting into edit mode. i make the changes and give update data is updated in database . but still all the controls are in edit mode only "actaully once we give click then update then i should again gone to read only mode means all the values should again be showing in label field"
i am doing this in .cs file only
no sqldatadource is used or object datasource
right now this feature is not happening to me. what is the issue here?
looking forward for an solution
thank you
Since you aren't using any built-in code to do the update, you probably need to change the display mode manually during your update.
myDetailsView.ChangeMode( DetailsViewMode.ReadOnly );

Resources