how to display a set number of rows in a table view (titanium) - titanium-alloy

Manipulating the height like this is one way:
if(data.chats.length<8){
var newRowHeight = processBL.convert_percentage((data.chats.length*10)+5);
$.tableview.height = newRowHeight;
}
However it does not work if you have more than 10 rows. How can I specify how many rows I want on the tableview. Without setting it, I will typically have additional empty rows filling up the height of the table view.
Thanks

Related

Repeat Frame Query Returns Null and the objects inside the frame are not displayed

I have a repeated frame which has 10 fields inside it.Whenever the query fetches 0 rows, the repeated frame does not display any field.
I want the frame to display atleast the fields without any values
How to do it in Oracle reports.Any leads would be of much help
Thanks in Advance
If I understood you correctly, you want to display labels, even though there aren't any values to be displayed.
If that's so, move labels out of the repeating frame, but within its parent group frame. For example: if repeating frame's name is R_1, then labels should be part of M_1 which is parent of R_1.
-M_1 frame ----------------------------------------
ID Name Address ... --> labels
-R_1 frame ---------------------------------------
ID_field Name_field Address_field ... --> fields within the repeating frame
In order to do that:
set flex off, otherwise you'll "resize" all objects as you'll be moving labels around
resize repeating frame so that there's enough space above it, but still within the parent group frame
set confine off, so that you could move labels out (up, actually) of the repeating frame
Once you're done, you'll probably want to set both flex and confine back ON.

Set CONSTRAINED_RESIZE_POLICY for columns without first (for number of row) in tableView JavaFx

I have tableView with first column for row number. I would like to set CONSTRAINED_RESIZE_POLICY for all columns without first.
I made:
//First column implementation
column.setPrefWidth(40);
column.setResizable(false);
... //Make other columns
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
So I have first column with width I chose but other are wider than without last line in code above but still there is one additional void column.
And I have another question because I looked for resizing column to length of the longest text in column (I need it for first column) but I only found old answers with very long and tricky solutions. Is there any simple solution (method) to do it?
Edit: I found that when I try to manually resize columns, that they resize properly (as they should with CONSTRAINED) after only click to resize one of columns so I have a question, why they didn't resize from the start like I described above but after trying to manual resize. I think that problem is with setResizable false on first column but how can I repair this?
I found solution. To make other columns CONSTRAINED_RESIZE_POLICY there must be set size of the first column like below:
column.setMinWidth(40);
column.setMaxWidth(40);
and it's working without line setResizable(false).

What is the Maximum Limit of Display Column in Obout Grid Control?

My Problem related to Obout Grid is that I have to display more than 250 Column in grid.
& i am getting error
If i display around 100 columns its running well & display all records. Can any one tell what is limit of records that we can display in Grid
Hello I got Solution,
This is a limitation of the standard Unit class:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.unit.pixel.aspx
"The Unit class can represent values only between -32768 and 32767."
So you need to make sure that the sum of all the columns' widths is smaller than 32767.
The default width of a Column is 175px, so if you auto generate the columns you will be able to use up to 187 columns.
If the columns are auto generated, you can reduce the width of the columns using the ColumnsCreated event:
http://www.obout.com/grid/aspnet_events_columns.aspx
If the columns are manually defined using the Columns collection simply set a smaller width for some of them.
reference from blog: http://www.aspbucket.com/2015/11/what-is-maximum-limit-of-display-column.html

Flex 3 prevent duplicate stacking in ColumnChart control

Here is my Problem:
I'm currently using a ColumnChart to display 6 label/value pairs.
When two labels are the same, the chart stacks them up, one on top of the other.
I want to display these duplicates side by side, their value might be the same or it might be distinct.
My first thought was to append a unique id to the label, but that's not possible according to the client. So, is there a way to tell the chart to also take a hidden id into consideration?
Someone suggested to do some sort of grouping, but I need to display each chart separate, as if they were distinct charts.
the chart's data provider is an array of these objects:
obj.description = "des";
obj.countV = 3;//some arbitrary number
obj.id = 2; //a unique id...
the chart code:
I found my solution:
append an index # at the end of each column label.
Use a labelFunction to remove the last char:
columnLabel.slice(0, -1);
that fooled the chart into thinking they're all uniques but display all duplicates side by side.

Flex: Make columns aligned between 2 DataGrids?

I have 2 advanced data grids, one above the other. They both have the exact number of columns, and pertain to each other in the same way. But each is showing different data, which is why I split into 2 grids. However, on each one you can resize the columns, what I would like is to make it so that if you resize a column on either datagrid the same column on the opposite datagrid resizes as well, so they are both always lined up.
Is there a way to do this?
Thanks!!
private function onColumnStretch(e:AdvancedDataGridEvent):void
{
(adg1.columns[e.columnIndex] as AdvancedDataGridColumn).width = (adg2.columns[e.columnIndex] as AdvancedDataGridColumn).width;
}
Add to dategrid:
columnStretch="onColumnStretch(event)"

Resources