How to freeze/lock a single row in an ExtJs grid? - extjs4.1

I want to be able to freeze/lock the last row in my grid so that it is always visible at the bottom while scrolling vertically, just like it is possible to do so for columns eg: http://docs.sencha.com/ext-js/4-1/#!/example/grid/locking-grid.html. Is there a way to do so in Ext?Id appreciate any help.

In the grid config, where you specify the plugin
features: [{
ftype: 'summary',
dock: 'top'
}]

I might came here in a huge delay, but after I couldn't find anything online I thought it could be good if I posted my findings..
As of extjs4.2 a config option named 'dock' does the job. So: dock: 'bottom' would be perfect for this, same goes for 'top'!

Related

dojox.grid.EnhancedGrid losing focus

I have to refresh an Enhanced List as i have a "quick search" input field
that should update the list while you type. It does work fine, until I select one of the result rows. Then I move back to the input field and start typing but at that moment, the focus is lost and after every letter I have to click back to the input field.
Any method I found refreshing the grid sets the focus to the first header
cell. This means of course that my input field
looses focus. I cannot type more than 1 char without refocusing the field
:-(
Any idea how to re-render a grid (or enhanced grid) without changing focus?
gridtoc = new dojox.grid.EnhancedGrid({
id: 'gridtocsearch',
store: storetoc,
structure: layout,
class: 'grid',
align: 'center',
keepSelection: true,
plugins: {
filter: true
}
});
Thanks a lot, Monika
can you try like
keepSelection:false
official document says
keepSelection
Defined by dojox.grid.EnhancedGrid
Whether keep selection after sort, filter, pagination etc.
***************** updated answer*****************
take a look at this jsfiddle
http://jsfiddle.net/bnqkodup/520/

Highcharts - Trying to get a dyamic spline to update from left to right

Thought this would be simple enough but am having not much luck finding a reference to this in the Highchart API.
I would like to have the dynamic line chart display the xAxis updates from left to right. i.e., the tadpole swimming to the left margin.
Can't for the life of me find a parameter to do this.
https://www.highcharts.com/demo/dynamic-update
Well.... should have seen that.
xAxis: {
type: 'datetime',
tickPixelInterval: 100,
reversed:true,
},

Keen IO Chart Labels

I'm trying to figure out how to adjust the labels on an Area Chart visualization of my Keen IO data. I've looked through the available configuration options, but I'm not seeing what option would do this. Currently my chart just lists "null" on the legend on the right side of the chart, and on the hover tooltips when you hover over a particular peak. Just looking to switch it to list "Hits" instead of "null."
Does anyone know how/where I would configure those labels?
You can use labelMappingfor that. Something like:
client.draw(funnel, document.getElementById("chart"), {
library: "google",
chartType: "columnchart",
labelMapping: {
null: "Hits"
}
});

Sencha Touch 2 - Setting a max date on a datepicker

Does anyone have any idea's how to prevent a user picking a future date (greater than current date) on a datepicker field?
I know I can validate easily enough after the user clicks the done button on the picker and show them an alert message telling them they cannot pick a future date.
But it would be nice if there was some way to actually prevent the selection in the first place, such as disabling some of the slot values from selection. I'm not so sure this can be done, maybe validation is the only way?
As I dont have enough reputation so I need to add my comments as an answer.
You have two ways to do this.
Listen to the change event and hide the donebutton if the date is greater than max date.
Override the Ext.picker.Date and hide the date values in the picker itself which are greater than max date at the initialization time.
2nd option is a bit complex but worth it if this feature is most important.
You can at the very least limit the yearFrom and yearTo this is however only available as a documented config in the Ext.picker.Date class which is actually the underlying class that gets called when creating an Ext.field.DatePickerinstance.
You can set options for the Ext.picker.Date by passing in the options to the picker property of the field
http://docs-origin.sencha.com/touch/2.4/2.4.1-apidocs/#!/api/Ext.field.DatePicker-cfg-picker
e.g.
Ext.create('Ext.form.Panel', {
fullscreen: true,
items: [{
xtype: 'fieldset',
items: [{
xtype: 'datepickerfield',
label: 'Birthday',
name: 'birthday',
value: new Date(),
picker:{
yearFrom:2000,
yearTo:2020
}
}]
}]
});

How to create a hierarchy

just started playing with cytoscape.js and the breathfirst layout. Looks like it will be a great library. I want to be able to create a layered or tree like layout, ideally being able to pin nodes to a level. Is there any suggestions on the correct layout to use or how to achieve it.
Does anyone know how to use the roots: ? I tried like this "roots: 'xyz'" where xyz is the id of the root node in my diagram.
Also I was trying to lock my root node like below using the position and locked attribute which did not seem to work.
{ data: { id: "XYZ", name: "XYZ", weight: 100, faveColor: "#F5A45D", faveShape: "triangle" , position: {x: 150, y: 10}, locked: true}},
If I can't get it to work my fall back will be to use graphviz to calculate the layout and position the nodes manually in code.
You can only specify elements as roots. I'll add the ability to use selector strings for 2.2.4:
https://github.com/cytoscape/cytoscape.js/issues/498
As for the layout itself, nodes are positioned based on edge direction hierarchy, so you can only guarantee the position of the specified root nodes. The rest fall underneath in the hierarchy.