I was trying to print an ExtJs grid and found rahul singla post:
http://www.rahulsingla.com/blog/2010/10/extjs-printing-gridpanels-with-groupingview-and-groupsummary-plugin
which led me to Ed Spencer Printer class, wich led me to Loaine's ExtJs4 version
https://github.com/loiane/extjs4-ux-gridprinter
which is absolutely great, so far so good, but the grid I'm trying to print has a multilevel groupingsummary feature for wich I used this UX
http://www.sencha.com/forum/showthread.php?265814-Multi-level-grouping-summary-and-grand-totals-for-Ext-JS-4.2
Problems are:
1.- While this grid does get printed it doesn't recognize the grouping feature.
2.- The second time the grid with the multilevel groupingsummary feature is rendered or tried to be rendered I get "TypeError: oldGroupCache is null"
I know this stuff is too specific but hopefully somebody else is trying to acomplish the same.
Any help would be appreciated.
(I'm using ExtJs 4.2.1 and can't go to a newer version because of my work)
Related
I have implemented a ComboViewer that also uses content proposal (ContentProposalAdapter) functionality in Eclipse RCP application (using SWT). User is able to type first letter of e.g. a street and he gets all valid proposals e.g. streets that starts with 'Mac'. It works really great. Now I am facing additional problem. Number of data to show in this combo can be very big. Now I got almost 200000 records to show. Creating Combo element in GUI takes forever and it crashes my RCP application. I thought about introducing pagination control for this ComboViewer. I would like it to work very similar to this ExtJs solution:
http://dev.sencha.com/deploy/ext-4.0.1/examples/form/forum-search.html
What I was able to find is Nebula Pagination Control (https://www.eclipse.org/nebula/widgets/pagination/pagination.php)
I found just examples where it is user in grid, but not in a combo. There is something like PageableTable, but it is something way different that I need. Does anyone have any example of combining pagination control with ComboViewer? Maybe some other idea, not necessarily Nebula ?
Thanks
You could try using a Text field with AutoCompleteField and TextContentAdapter.
new AutoCompleteField(textControl, new TextContentAdapter(), suggestions);
I am using Sencha touch grid and I am facing one issue in the development.
The issue is, if I reorder the columns of the grid using ViewOption plugin, the SummaryRow values get disappered. How do I retain the summary row values after Column reordering?
I am using Sencha touch 2.3.x
Thanks in advance!
I was reading the sources and I don't think Grid is finished.
What I found is the ViewOptions.onColumnReorder apparently only change the DOM elements order and not the store order. And reading the SummaryRow.updateGrid I didn't find any bind with both. SummaryRow only bind with store and add/remove/etc columns (not reorder).
I can be wrong, I didnt try grid yet. But I guess your best shot is try to force the SummaryRow.doUpdateSummary after the onColumnReorder.
I'm looking to load a pretty big dataset (around 20k rows) and use the extjs 4.2 grid buffered rendering to view the data. I've seen so many examples that are different (extjs 4.2 examples) that my head is spinning and I can't get any of them to work. There is even an extjs page http://www.sencha.com/blog/first-look-at-ext-js-4-2-grid that shows how simple buffered rendering is in extjs 4.2 (just add the buffered rendering plugin to the grid ) but the examples in the sdk don't look like the example on the web page (they still use the stores buffering configs even though the linked to page above explicitly says you don't need to do that in extjs 4.2).
In the end ... I don't want to hit the server over and over and buffer the data that way. I want to load all the data and just buffer the grid's current dataset.
Does anybody know of an example of how to make that happen ?
Sorry my english is not so good.
Also, if I understood your question on the right way, you have to learn the difference between Remote- and Local Filtering. I think what you search is a local filter,
there you can set individual parameters as you want.
take a look to this example, on the button of the grid, you can find buttons to switch between local- and remote filters, there you got a working example for local filtering. Should do what you want :)
Im using Extjs 4.1 with a gridpanel. Now I want to get a row by id/index to just hide it (not filter).
I tried that (it says there is no method getRow):
gridpanel.getView().getRow( 0 );
What is the correct way now?
I know gridview has getRow, so why cant I use it?
Edit: there seems to be no such method in 4.
Since ExtJS 4.1.3 no longer returns a GridView you have to work around this.
Take a look at:
Sencha Forum --> Getting gridview row element
In my opinion its a ugly solution, but it's not getting alot of attention..
my question is:
"What is the right way to operate with XTemplates in a MVC like project in ExtJS4?"
> Are XTemplates supposed to be in YourApp.view or in YourApp.controller?
The ExtJS4 docs just shows how to use XTemplates with some data, but i haven't seen a MVC-like example.
So,
Where should our XTemplates take place at?
Can XTemplate take some variable from controller as argument? (in case i would get some calculated data in controller and every time those data changes they should be passed to XTemplate and this XTemplate should form and render new template to the webpage;
P.S.
Sorry for my English and Thanks for your help;
I'm not an expert, but i can share with you/SOF a few thoughts and hopefully help you out to understand more the templating engine of extjs.
In very general terms, the XTemplate is what a view/control(grid, texfield, etc) is built on. Every component control in extjs has a "Tpl" or "fieldSubTpl" or "subTpl" etc.. config options which is the XTemplate to use to render the component UI.
So, imagine you are using extjs native class "Ext.form.field.TextArea" which represents an input text control, if you look in the source code of extjs framework (I think people often forget about checking out the source code, learn and get inspired from it, get the grip on things, see how extjs dev. team does things) and locate the class definition for it, and you will be able to see how the XTemplate is used. So I think if you can check this out and understand it, ofc, sencha docs is a valuable resource, you get already some answers.
XTemplate takes an array with data/single object whose properties need to match the variable inside the XTemplate, so you got an object representing a person and a property name i.e. person.Name so in your xtemplate would would show the name by using {Name} inside the xtemplate. You mention about doing some calculation in the controller and then pass it into the XTemplate, that is fine you can do it, but remember that the XTemplate support custom functions which can manipulate the data before the Xtemplate is rendered as you can see in this example from sencha docs http://docs.sencha.com/ext-js/4-0/#!/api/Ext.XTemplate
If you want an MVC application which uses XTemplates explicitly, you can check the "MVC Feed viewer" app from sencha here http://docs.sencha.com/ext-js/4-0/#!/example/feed-viewer/feed-viewer.html
I hope it helps you.
Happy Easter!