Gruping Grid GXT 2 - gxt

How can I put the total values of a group of the grid in the same line with the type of the group?
Like:
[-] Fruits $4.00
Banana $2.00
Apple $2.00
So when I have the group collapsed, I have this
[+] Fruits $4.00

Use Live Group Summary. Link: Sencha GXT 2 LiveGroupSummary Example
If you want to show the summary row at top, it will be a difficult task as there is no direct way of doing it.
You have GXT classes GroupingView and GroupViewSummary which extends GroupingView. You can see in the doRender method of GroupingView, the header text is being generated. You will have to override the method by following the steps of renderSummary method of GroupSummaryView. The header and summary, both are created in different classes, so it will be a difficult task. Just follow the implementation of GroupViewSummary which extends GroupingView and change the renderSummary and doRender method according to your need.
I will not suggest doing so, because it might break the functionality.

Related

UICollectionView custom layouts

Hi I am beginning iOS development, and was playing around with UICollectionView. I was just wondering how you could achieve this type of layout. As shown below:
The idea is to have like a main news article in the big cell. Just confused how I am suppose to get two cells in the 2nd column. Much appreciated!
Create custom class which will act as layout for your collection view. This class will child class for UICollectionViewFlowLayout.
Then you can override below two methods and can create your own custom layout as you want.
- (NSArray*)layoutAttributesForElementsInRect:(CGRect)rect
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)path
UICollectionViewLayoutAttributes is class which will deal with cell position, frame, Zindex etc
You can also use below properties.
collectionView:layout:minimumInteritemSpacingForSectionAtIndex:
collectionView:layout:minimumLineSpacingForSectionAtIndex:

drawing grids in a UITableViewCell using Monotouch

Hi I am just a week old with Monotouch, the task that I have in hand is to display a table on an ipad with multiple rows and multiple columns i.e. a grid like structure with many cells and each cell containing some data which can later be edited too.
My application should look somewhat like the figure below, except that it has to be working on an ipad.
The only useful link I've found is this, but this article discusses how to do so using Objective C(now since I am using Monotouch & c# so I am not comfortable with Objective C so I cannot understand this solution).
So my question how to achieve the same (i.e. a table with many columns and rows - a grid) using Monotouch.
Please help! Thanks in Advance.
Ajit,
If you want to use the UITableView'to render your data, you should effectively make it so that each "row" can render the columns in the way that you need.
What you need to do is to create a UIView subclass that can render the elements in your columns. There are various ways of doing that, you can:
Create your own UIView that implements a draw method and draws on demand.
Create a UIView that is a composite and merely has some children views
Once you have the view, you can add this to your UITableViewCell
You can follow some of my recommendations for creating those UITableViewCells here:
http://tirania.org/monomac/archive/2011/Jan-18.html
But 2-D browsing using a 1-D design is not optimal. Chances are that all that you want is to render your various items in a grid, so you might as well just use the UIScrollView directly and add all of your child UIViews there.
The only difference is that UITableView is designed to recycle/reuse some expensive objects (each row) while a basic design that stashes everything on the view will not have any of those benefits.
A more advanced option would be for you to create/destroys the views that are shown/hidden as the user scrolls.

How to change Nokia full touch lwuit form header color

I want to to change the header color of nokia lwuit based full touch form and i have tried setTitleComponent method but it is not working. Please also check the following link
http://projects.developer.nokia.com/LWUIT_for_Series_40/wiki/UsingSeries40FullTouchFeatures
in which it is mentioned we cannot style the header but is it means we cannot change the bgcolor as well or put custom images in the header?
Note that when using LWUIT for Series 40 port, the default way of running LWUIT apps is a normal-size canvas in Series 40 full touch devices. Thus the Series 40 chrome shows on top of canvas. And there is no way of customising it (other than the title text).
If you want to provide branding elements to the title, the options are:
1. create an additional lable below the Series 40 headerbar
2. run the application in full-screen. We are planning to create a high-level API for this but currently it is already possible using the following trick:
((GameCanvas) (javax.microedition.lcdui.Display.getDisplay(this)).getCurrent()).setFullScreenMode(true);
In the latter option you will of course lose the Series 40 full touch layout.
Use lwuit source, you can change method visibility if required, this is example what i used to use gradient color
form.getTitleComponent().getStyle().setBackgroundType(Style.BACKGROUND_GRADIENT_LINEAR_VERTICAL);
form.getTitleComponent().getStyle().setBackgroundGradientEndColor(Color.GRADIENT_END);
form.getTitleComponent().getStyle().setBackgroundGradientStartColor(Color.GRADIENT_START);
form.getTitleComponent().getStyle().setFgColor(Color.WHITE);
form.getTitleComponent().getStyle().setPadding(10,10,0,0);
form.getTitleComponent().getStyle().setFont(font);
Here Color is my custom class that is used for color code, you can use your one.

Customising the NamePicker in Extension Library

I want to pick multiple customers from a view using the NamePicker in Extension Library.
<xe:namePicker id="namePicker1" for="customers">
<xe:this.dataProvider>
<xe:dominoViewNamePicker
labelColumn="IdName" viewName="viewCustomers">
</xe:dominoViewNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
The view has two columns:
1. CustId - customer id
2. IdName - customer id + “-“ + customer name
The NamePicker shows the IdName in the left box and the CustId for the selected customers in the right box.
Is it possible to change what the NamePicker shows in the right box?
I want to display the customer’s name in addition to CustId for the selected customers.
Is it possible to customise the Search function? It seems to me that now you can only search for something that match the beginning of the first column in the view.
Absolutely. The great thing about the extension library (Extlib) is that it is open source. However, if you were looking for the quick solution of "Yeah, just set this property and you're done" ... well ... I'm afraid its not that easy. You can however, write your own component extending the component from the Extlib, and then add/override the functionality that you want to customize.
So to sum up, yes, its possible, but its not just as easy as changing some properties on the control.

Rating screen using LWUIT

I want to create a MIDlet from where I call the class.In the class there is an Image Array which contain 10 images and default ration is 0.Now I want to know how to create the class when the MIDlet call the class suppose iRating=new Rating(3),where Rating is the class name.when I show() the form at that moment only 3 image will be highlighted rest are not,if I put 4 then 4 image will highlighted.Please help me how to do
the output will be as follow.
when we click the 3rd star then first three star will be highlighted rest are not.please suggest me how to do that.
I suggest you use a checkbox or toggle button (checkbox with setToggle(true)) and set the images appropriately. To place 5 of these just add them all into a horizontal layout container.

Resources