I'm using a ListView to display a set of input controls which are database driven. The database tells me the name of the input value and its type, and I have my ListView properly displaying a set of rows of input controls based on this information.
What I'd like to do is have a set of rows, with each row housing N input controls, until there are less than N controls to house, and then just those.
So, if the total is 10, and N is 3 then output would look like this:
x x x
x x x
x x x
x
I thought I'd accomplish this through ItemTemplate/alternatingItemTemplate, but now I'm not sure how.
Any ideas?
Item/Alternating item template will not help you . Have a look at GroupTemplate and GroupSeparatorTemplate. SetGroupItemCount="3" in the ListView start tag, and put your repeated input control in the GroupTemplate. Then use <br/> element as your separator.
An alternative would be to use a table and have the GroupTemplate specify a table row, with the repeated element being a table cell. Here's a link to MSDN material on the topic, which shows how to do a tiled layout using a table:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.grouptemplate.aspx
Related
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.
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
I want to display image dynamically in a list. I have two columns in a list. The first column contains some numerical values and other contains smiley icon. My requirement is, if number in first column is greater than 50, I want happy smiley to be appear in a second column in a list, and sad smiley for less than 50 number. Currently I use hyperlink column to display image in a list. And I am adding image manualy.
I am looking forward, if it is possible to automatically display image based on first column number. Something like calculated columns. Lets say,
HyperLink/Picture Formula:
column =IF([someNumer]>50, "href = c:\Test\happySmiley.ico", "href= c:\Test\happySad.ico" )
I was wondering if we could do something like this, or any other suggestion is appreciated..
You are looking for KPI indicators.
You can also find great overview here:
How to create a SharePoint KPI column
And also check similar question on SPSE:
Make all KPI Status Icons in diamond shape
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.
can any one help me how to make cells in flex....
Suppose if i need 4 columns and 10 rows...it should display grid with rows and columns.
And i should be able to find each cell.
It depends. If you need a table-like component you can use the mx:Datagrid component or if you have custom component which you want to repeat you can use the s:Datagroup (Repeater in Flex3) with a Tile layout. You can use getElementAt() to get the cell.