smartgwt listgridfield with boolean type with checkbox in field header - checkbox

I've listgridfield in which I need to show checkboxes. So, I just set that field like
listGridFieldChk.setFieldDataType(ListGridFieldType.BOOLEAN);
It working fine like I want, only thing which I need now is checkbox in header with the same field. So when user want to check or uncheck all checkbox at once will do with this.
I know about the listGrid property which put checkbox field at first column
thisGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
But this will not helpful for me, I need it at custom level.

Related

Textfield becomes not visible or invisible after checking a specific option in my checkbox in PowerApps. What do I need to correct?

It is not working ;(.
Let me write it down like this
The checkbox name is: Categories Checkbox
This checkbox has 4 options you can check: "clients", "employees", "consumers", "other"
I have a TextInput1 which I only want it to be visible if the option "Other" from the checkbox "Categories Checkbox" is checked.
This is why I am using this formula but it is not working :
If('Categories Checkbox'.Value = "other",true,false)
What do I need to correct? Can somebody please write me down the correct formula?
I tried to change the name of my checkbox,
I also tried to make the first letter a capital letter of "Other" instead of "other"
I also changed the Value in the formula to text
I also changed the textfield,which was text area to Single line of text in the Dataverse Table.
But still if I check or uncheck "other" then the textfield does not appear.

ExtJs property grid - Selected rows editable?

I'm using a property grid with editors set in sourceConfig. I want only some rows to be editable and not all. Returning false in beforeedit disables all. The reason is, I have a button in a grid. When I click the button, the grid turns to a textfield! Any way to do this?
The beforeedit event should provide you with the editor and the editing context. Lets say your callback function looks like this:
function(editor,context) { ... }
Using the context you will get the record which get edited by accessing context.record while the editor can provide you with the editor form from where you have access to all rendered fields within that form. To get the form you have to get the editor first and after that you can fetch the form
var form = editor.getEditor().getForm()
This way you can be sure that the editor has been set up. To get a field within that form simply call
form.findField('fieldname') // fieldname is the dataIndex of the column
You can now do nearly anything based on your conditions.
In addition the record is also loaded into this form an can be accessed by calling form.getRecord()

Include text between check boxes in a check box group?

Anyone know if there's a way to include some text between check boxes in a check box group in XPages? What I'd like to do is implement something like this with a single check box group:
Explanation about these checkboxes:
- Checkbox 1
- Checkbox 2
Explanation about these checkboxes:
- Checkbox 3
- Checkbox 4
I'm pretty sure there isn't an easy solution to this using the CheckboxGroup control. You'll have to build it one checkbox at a time.
You will need to have multiple checkbox groups, then on an onchange you can change the value of another group to null.

Additional filtering parameters in #fuelux datagrid

Does the fuelux datagrid support adding additional filter options? I would like - for instance - to add (next to the filter dropdown you already have in place), a checkbox which should also be added as a parameter to my function that retrieves the data remotely from the server.
It would be nice if the grid would automatically take any parameters from input elements that we can mark by adding a specific class or data- attribute.
Thanks very much! :)
David.
You can absolutely do this.
Add filtering logic to the datasource you provide, keyed off any custom property you add to the datasource.
Add the checkbox within the datagrid markup (or anywhere).
When your checkbox is clicked, update the custom property on your datasource and then call $('#MyGrid').datagrid('reload') to tell the datagrid to reread your datasource

How to make an extjs grid a form field?

I have a requirement to create a custom form field that is basically an extjs grid. The user should be able to click a result in the grid. This clicked result should then become the fields value. Also, this field needs to extend Ext.form.field. Here's what I got:
Ext.define('MyApp.field.Grid', {
alias: 'widget.GriedField',
extend: 'Ext.form.field.Base',
I'm a lot of confused on how to add a grid to form field base. Looks like form field base's template expects HTML. How do I get it accept a component?
If you just need to select a value from a list of items. Why not use a combobox?
If you need to select multiple items. There is an example of how to use the MultiSelect ux component in the documentation examples.
http://docs.sencha.com/ext-js/4-1/#!/example/multiselect/multiselect-demo.html
If you really must use a grid. Then I wouldn't bother with trying to create a field type and cause yourself grief.
Add a listener to your grids selectionchange event and update a hidden field in your form with the value you want from the grid. Job done.
I ended up putting the grid on a form indirectly through creation of dependencies on my model.
My model has master-detail, which the detail is just a store reference. I found that using associations did not work for me.
So, in adding a field to a form, I have something that manages changed events for the model (master record) and the detail stores.

Resources