How to add component to XTemplate in ExtJS - extjs

How can I add a component to XTemplate in ExtJs? I need to add something like a button for instance.
Thank you.

With standard Ext JS XTemplate you can't use components as template values.
However you can use CTemplate extension which allows ExtJS components to be used as template values. http://skirtlesden.com/ux/ctemplate

Related

How to write the Xpath for the Dynamically generated ID by Extjs

1Iam finding difficulty in getting the Xpath for Dynamically generated ID by Extjs.My application is using ExtJs rich UI.
Could you any one help me out'
This div is inside a table
Sample HtmlSample HTML
In this id ext-genXXXX changes in every refresh.
Can you add custom css class to the control element, e.g. see this: In ExtJS, how to add a custom CSS class to data grid rows?, and then use By.cssSelector instead of By.id?

how to use css classes inside angular formly

I am using angular formly. I read the documentation,but they didn't mention how to apply css classes from options.
I am trying to apply kendo ui classes to form fields but of no use.
Can anyone help me?
here is my jsbin
http://jsbin.com/golehimize/edit?html,output
Here's how you apply a custom class to the formly-field element: https://jsbin.com/foqixe/edit?html,js,output
I'm not sure what classes you're wanting to apply, but this would be the way to do it (see the email field configuration).

Angular Formly - RichEditor

I need to create a form section template, so users can add/remove a new html form section on the fly.
I'm using Angular-Formly for the form template. It works really well for me. However, I need to include a rich editor inside of my form
Can anyone here please provide direction for how to do that? Can I write a angular directive to wrap a .Net rich editor in there? Has Angular-Formly provide a richEditor type or template already?
angular-formly doesn't provide a rich editor type out of the box, and I'm not aware of any open source integrations with one. But the textangular.com example as pointed out by #azium looks reasonable. It would be very simple to create a custom type using that directive. You could accomplish it like this (during the run phase):
formlyConfig.setType({
name: 'richEditor',
template: '<text-angular ng-model="model[options.key]"></text-angular>'
});
Here are the docs on custom templates, here's an example, and here's a lesson on egghead.io.

How to apply template to ItemSelector

I am using Ext.ux.form.ItemSelector in my application. I want to apply conditional XTemplate
to display list. I am using Ext js 4.2
Please Help me
You should be able to specify an itemTpl within the listConfig option.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.ux.form.MultiSelect-cfg-listConfig

Add dynamic column for Ext JS 3.4

Is there a way to add a column to a grid panel dynamically in Ext JS 3.4?
I'm trying to add a Row Expander column to my grid panel.
Like the one here (The first plugin)
I can do it by modifying the ui.js and manually adding a column (Like the one in the code behind), but I'm trying not to.
Any workaround would be highly appreciated!
Edit: I found this for Ext JS 4. Something similar in 3.4?
In 3.4 you have to use reconfigure method on the grid:
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.GridPanel-method-reconfigure

Resources