removing field in form dynamically sencha 2 - extjs4

i am using sencha touch 2.0 and want to create a button '+' and '-',to add and remove a field dynamically,i have figured out the add part using
this.getForm().insert({...});
but remove part does not hide the field.
this.getForm().remove('...');

You have to set an id for your field and then try
this.getForm().remove('your_field_id_here')
Hope this helps.

Related

PEGA SLIDER - and get refresh property

I got a requirement to do a slider in PEGA.
The issue is that I do not manage to get the field/property refreshed with the slider value. I need to use this property in a declare expression and in conditional visibility (layout).
I am looking for something like the autocomplete where the value is refresh without submitting.
Any idear will be welcome.
THX.
Ok, I have solved the issue. In order to actualise the property .Amount outside the layout, I needed to configure an action on the first layout. The one holding the slider. In this layout -> in actions : add an event: Change and Add an Action : Refresh-This section / Target Section.
The value is then dynamicly refreshed in the clipboard too.
PS : in order to have different step value inside the same slider (ex: from 0 to 10 step = 1, form 10 to 30 step = 3 ... ) just use a property in the Slider Parameters 'step' of the slider and link this property to a declare expression. Within the declare expression you can configure as much step as you want.

Dojo tree grid shows ... for null valus

Hi I am using Dojo tree grid for my application,
For null values, Dojo tree grid uses "..." . I need to show it as empty field. Help me how to avoid "..." in tree grid display?
Sorry i couldn't add screenshot. Bcoz i dont have enough reputation
Thanks,
Siva
So I am assuming you are using dojox/grid/TreeGrid. You need a custom formatter function for your cells in the layout object you provide for the grid . Check out the documentation for the cell formatter http://dojotoolkit.org/reference-guide/1.10/dojox/grid/DataGrid.html. In your formatter you need to check if the value is not what you want and return an empty string.

How to create dropdownlist with static and dynamic values in Asp.net MVC with a divider between them

I want to create a dropdownlist which have three static values: Select All, Text Only, Numeric only. After that I like to add a line with some padding (just to separate these options) and then add some dynamic options.
I am not sure how to do this, Can some body please help?
So far I have created a List<SelectListItem> in my view model, and populated the static values from BLL. But I am not sure how to add a divider line in the middle now, and append some dynamic options after that.
Thanks
The normal select tag will not work like that, you will have to create custom dropdown using spans or divs.
See some examples here:
http://tympanus.net/codrops/2012/10/04/custom-drop-down-list-styling/

'First in' in Sencha Touch adding items to the container

Can I add an item to the container as the first one rather than appending all existing ones.
From what I understand this.add([item]) will add item as the last one, however I would like it to apper it on the top of the screen before anything else has been added.
You can use insert method of container like this:
this.insert(0 , item);
where it would appear depends on your layout.

Sencha Touch 2 Field Focus

Does anyone know the Sencha Touch 2 equivalent of ExtJS4's:
form.getForm().findField("myfield");
Thanks.
use form.getValues(); assuming you can get the form element... if you needs to do that use refs... on my mobile rigjt now, i can post more sample code later if necessary
I use that way:
var field = vorm.down("textfield[name=username]");
Example:
form.down("selectfield[name=username]").setLabel('User');
form.down("selectfield[name=username]").setValue('email#te');
form.down("selectfield[name=username]").setPlaceHolder('email#test.com');