Advice on rendering multiple data grids based on 1 array
What is the best way to render the following screen ?
There is 1 array collection that is sorted (in this example) by category. The screen lists by category and then prints a datagrid (perhaps) of the items within the category. Each time the category changes, a new header and data grid is rendered.
Hot Dogs (Category Description... the could be n number of categories)
Item Product Brand Grade Price
1 mini hot dogs mayer supreme 8.00
(there could be n number of lines)
Beef
Item Product Brand Grade Price
1 mini beef mayer supreme 8.00
(there could be n number of lines)
Use XML data and then you can use e4x syntax to extract the data you need by filtering by category in e4x syntax.
See these LiveDocs links:
http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_03.html
http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_01.html
Similar Messages
-
Multiple data sources based on a parameter
Hi there!
Is it possible to get data from different data sources based on a parameter?
For example, I have SQL query and parameter pFI that can be equal to 1 or 2.
So if the pFI = 1 then I need to execute this query in DB1 otherwise I need to execute It in DB2.I do not think its possible to change the datasource on a data model dynamically. However you could create two seperate data models and two seperate layouts using a parameter to distguish between the two when you call the report.
Richard -
How to develop a report based on multiple data bases in BIP
Hi,
I have to develop a report based on multiple database(Sources). My queries is having multiple data base tables. How to achieve this in BIP
Regards,
MalliHi ,
After creating the dataset under datamodel save your data sets.
Click on Datamodel , on the right side window you will have the Main data set option , click on the drop down option and select Concatenated sql option.
Check the below links you will get a good idea.
http://www.rittmanmead.com/2008/04/bi-publisher-reports-with-multiple-data-sources/
http://docs.oracle.com/cd/E12096_01/books/PubUser/T421739T423025.htm
If the Post is useful to you award the points :)
Thanks,
Ananth v -
Using GETGUI command --in ALV grid, how to extract multiple DATA
Using GETGUI command , I am able to get a single value form the ALV grid. Please explain me how I can read multiple data like rows and columns data from the ALV grid.
Please be detailed as I already tried selecting the whole block of ALV grid, but I could not help myself.
Regards
Srinivas.Hi Srinivas,
You will have to use the concept of Regular expressions for this. We will have to loop through each row/coloumn to do what u desire.
The ID of an element on grid will be something like GRIDNAME-<ELEMENT NAME>[ROW NO] [COLUMN NO]
we need to parameterize the row and also the el;ementname changes for each column along with the column number. Please let me know if this much detail is enough. If not i can show u a real time ecatt code snippet on how to play around with grids.
Regards,
Justin -
Problem rendering a combo box in the data grid
Hi,
I am rendering a combo box in the data grid control using an
item renderer. When I click on it to select a value from the drop
down, the combo box immediately closes giving no time to even click
on the dropdown. This doesn’t happen every time the combo is
clicked, although it happens frequently. What I think is that the
problem arises because the data grid tries to refresh the renderers
and during this process, the existing combo is removed, thereby
getting closed automatically. Please let me know of a work around.
Thanks,
Chereehi hiwa,
i have to add combo box in datagrid dynamically.
it should append as and when i add the data in the above text boxes.
thanks in advance. -
Column formatting based on grouping data value- advanced data grid
Hello Everyone,
I am using advanced data grid to display hierarchial data nested upto depth 4. I have to color the leaf nodes conditionally based on the grouped column value.
Say for Eg.,
If the data is something like
Company
Manager
Jim $4000
John $3000
Accountant
Smith $2000
Sam $3000
I have to color Jim and John based on they being a manager. In other words, how do I get Manager and Company information for the leaf rows. The data is serial to start with and I am grouping it before displaying.
Please let me know how this could be done.
Thanks
ArunOnce htmldb.oracle.com is available again, you may have a look in my demo application:
http://htmldb.oracle.com/pls/otn/f?p=31517:1
In the tab section I, you will find several examples on pop-up pages. There this conditional
displaying is included as well.
Denes Kubicek -
Add Total for a Column in Data Grid Screen Based on Query
Hi Guys , I have query based on table Payments in which I search By Start Date , End Date and tenant person [ from drop down List ].
How to display sum of Payments.[Amount] column in the query screen , which off-course varies for selected person.
OmarThe data grid doesn't support calculating aggregate functions on columns automatically, but you can write a little bit of code to show the total of the payments right beneath the data grid.
Add a screen member called PaymentsTotal that is the same type as the column that you want to sum.
Drag out the screen member to be underneath the data grid. You can change the sizing settings (e.g. Horizontal Alignment) so that it aligns with the data grid how you want it.
Select the Payments collection and select Payments_Changed from the Write Code drop down.
In the generated method, write the following code:
partial void Payments_Changed(NotifyCollectionChangedEventArgs e)
// Total is the name of the property in my Payment entity that I want to sum
this.PaymentsTotal = this.Payments.Sum(p => p.Total);
When you run the screen, the PaymentsTotal property will show the total of all of the payments that are shown in the data grid.
Justin Anderson, LightSwitch Development Team -
Using drag/drop to build data grid rows from multiple lists ?
Hi,
I have implemented some simple drag and drop between grids and lists, including images.
What I need to do now is quite a bit more complex:
Create rows in a data grid by dragging and dropping from multiple lists. That is, for a given
row, column 1 receives data from list A and rows in column 2 - 5 receive data from List B
I haven't found any examples that do this and my initial hacks haven't been successful.
If you have any suggestions, they would be most appreciated !!!
Thanks !This does the trick...
For my destination grid
protected function dg_dragDropHandler(e:DragEvent):void
// Dynamically add columns to the grid by dragging them from the new column list
if (e.dragInitiator["id"] == "lNewColumn")
e.preventDefault(); // handle this manually
var Id:Number;
var Name:String;
var numCols:int = e.dragInitiator["selectedItems"]["length"] as int;
for (var i:int=0; i < numCols; i++)
Id = e.dragInitiator["selectedItems"][i]["id"];
Name = e.dragInitiator["selectedItems"][i]["Name"];
addGridColumn(Id, Name);
private function addGridColumn( Id:Number, Name:String ):void
var dgc:DataGridColumn;
var cols:Array = dg.columns;
// not a duplicate column
dgc = new DataGridColumn(Name);
dgc.width=150;
dgc.headerWordWrap = true;
dgc.itemRenderer=new ClassFactory(MyLovelyItemRenderer); // unlike mxml, must explicitly cast
dgc.width=156;
dgc.headerText = Name + "\n Message";
dgc.dataField="messageId_" + Id.toString(); // allows split on '_' later to get Id
dgc.setStyle("textAlign","center");
cols.push(dgc);
dg.columns = cols; -
Data Grid wilth Multiple ArrayCollections
I am using an array collection to store a month name and a
list of the monthly sales for a list of people, which are in their
own array collection. Adding an item to the array collection looks
something like this:
myCollection.add({month:"January",salesArray:someArrayCollection});
Where someArrayCollection has the January sales for a number
of people. The point of setting it up this way is that the size of
the embedded array collection (the number of people to display)
changes depending on what geography the user selected. Simply
binding this to a data grid leaves me with two columns, one listing
the months, and the other listing all the people's sales for that
month separated by commas within the grid tile. How can I break
these out into separate columns?
I know that you can list out the DataGridColumns within a
DataGrid and specify which field the column refers to. I'm trying
to find a way to set the dataField attribute to a particular item
within the embedded array. I would think that the code would be:
dataField="salesArray.getItemAt(0)"
to return the first person's sales in it's own column, but
this doesn't work. Any advice would be greatly appreciated.Hi GWD and thanks for responding.
I fully understood your explanations and the example you
provided.
I'll give it a try, for sure.
But I want to know:
- How do I populate a DataGrid Component? Like a List
Component? (you said they are quite the same, I assume methods to
apply are identical...)
-In the same way, I can pull out the data from a DataGrid as
I do for the List, right?
Thanks again!
Best,
gerry -
I posted a query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). I got some answer and reference from the forum.
I presented to my Oracle consultant and representative from Oracle Malaysia. They said impossible. I do not believe what they said. I do believe can be done.
Can someone help or direct me to an expert that can help me on thise90f478a-c529-4c48-b189-51eebeaed477 wrote:
I posted a query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). I got some answer and reference from the forum.
I presented to my Oracle consultant and representative from Oracle Malaysia. They said impossible. I do not believe what they said. I do believe can be done.
Can someone help or direct me to an expert that can help me on this
We don't know the "query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). "
We don't know where you posted said query.
We don't know what "some answer and reference" you received "from the forum."
We don't know what it was that your "Oracle consultant and representative from Oracle Malaysia" said was "impossible".
So on what basis are we supposed to "help or direct" to "to an expert that can help "? -
How to efficiently log multiple data streams with TDMS
Ok, first off, I'll admit I am completely clueless when it comes to logging, TDMS in particular. That said, I'm trying to work out the best way to log some data from an existing LabVIEW-based control system, so that users can later access that data in the event of catastrophic failure or other situations where they might want to see exactly what happened during a particular run.
I've got a total of between 6 and 12 data points that need to be stored (depending on how many sensors are on the system). These are values being read from a cRIO control system. They can all be set to Single data type, if necessary - even the one Boolean value I'm tracking is already being put through the "convert to 0,1" for graph display purposes. The data is currently read at 100ms intervals for display, but I will be toying with the rate that I want to dump data to the disk - a little loss is OK, just need general trending for long term history. I need to keep file sizes manageable, but informative enough to be useful later.
So, I am looking for advice on the best way to set this up. It will need to be a file that can be concurrently be read as it is being written, when necessary - one of the reasons I am looking at TDMS in the first place (it was recommended to me previously). I also need an accurate Date/Time stamp that can be used when displaying the data graphically on a chart, so they can sync up with the external camera recordings to correlate just what happened and when.
Are there specific pitfalls I should watch for? Should I bundle all of the data points into an array for each storage tick, then decimate the array on the other end when reading? I've dug through many of the examples, even found a few covering manual timestamp writing, but is there a preferred method that keeps file size minimized (or extraction simplified)?
I definitely appreciate any help... It's easy to get overwhelmed and confused in all of the various methods I am finding for handling TDMS files, and determining which method is right for me.I need to bump this topic again... I'll be honest, the TDMS examples and available help are completely letting me down here.
As I stated, I have up to 12 data values that I need to stream into a log file, so TDMS was suggested to me. The fact that I can concurrently read a file being written to was a prime reason I chose this format. And, "it's super easy" as I was told...
Here's the problem. I have multiple data streams. Streams that are not waveform data, but actual realtime data feedback from a control system, that is being read from a cRIO control system into a host computer (which is where I want to log the data). I also need to log an accurate timestamp with this data. This data will be streamed to a log file in a loop that consistently writes a data set every 200ms (that may change, not exactly sure on the timing yet).
Every worthwhile example that I've found has assumed I'm just logging a single waveform, and the data formatting is totally different from what I need. I've been flailing around with the code, trying to find a correct structure to write my data (put it all in an array, write individual points, etc) and it is, quite honestly, giving me a headache. And finding the correct way for applying the correct timestamp (accurate data and time the data was collected) is so uncharacteristically obtuse and hard to track down... This isn't even counting how to read the data back out of the file to display for later evaluation and/or troubleshooting... Augh!
It's very disheartening when a colleague can throw everthing I'm trying to do together in 12 minutes in the very limited SCADA user interface program he uses to monitor his PLCs... Yet LabVIEW, the superior program I always brag about, is slowly driving me insane trying to do what seems like a relatively simple task like logging...
So, does anyone have any actual useful examples of logging multiple DIFFERENT data points (not waveforms) and timestamps into a TDMS file? Or real suggestions for how to accomplish it, other than "go look at the examples" which I have done (and redone). Unless, of course, you have an actual relevant example that won't bring up more questions than it answers for me, in which case I say "bring it on!"
Thanks for any help... My poor overworked brain will be eternally grateful. -
08/29/2008 08:58:48 AM
Reply | Quote | Top | Bottom | Edit
hi all,
i have two classes.
class User
public String name;
public int age;
public Address address;
class Address
public String city;
I'm passing a List<Users> to the data provider of a
data grid . I can display the values of properties of Users i.e,
name and age.. My issue is how do i display the value of city which
is a propertyt of Address class in the datagrid column..
thanx in advance
Mark this message as the answer.
Print this message
Report this to a ModeratorHi,
Try labelFunction property of the DataGridColumn.
labelFunction allow you to specify a function name, which will be
invoked when that data is rendered. You will get the Object (User
id your case) corresponding the row being rendered will be passed
as argument to the function. You can use the object and return the
value you want to be displayed.
Please find more details on labelFunction at the URL below
http://livedocs.adobe.com/flex/3/langref/mx/controls/dataGridClasses/DataGridColumn.html#l abelFunction
You can also try custom item renderer.
Hope this helps. -
Hi there,
I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
database using the fillby query.
It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
each click of the fillby button.
also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered.
so actually 2 questions here:
1. how to populate a new row for each click of the fillby button
2. how to delete records from data grid view after an item has been entered
Thanks
VishwasHello,
The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
Some examples
Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
The following article with code shows this but does not address adapters.
Conceptually speaking the code in the second code block shows how to get the new key
Public Class Form1
Private Sub StudentsBindingNavigatorSaveItem_Click(
sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
Me.Validate()
Me.StudentsBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
End Sub
End Class
Get new key taken from
this article.
Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
Dim Success As Boolean = True
Try
Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
cmd.CommandText = InsertStatement
cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
cn.Open()
cmd.ExecuteNonQuery()
cmd.CommandText = "Select @@Identity"
Identfier = CInt(cmd.ExecuteScalar)
End Using
End Using
Catch ex As Exception
Success = False
End Try
Return Success
End Function
In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
Additional resources
http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
Want Access Data Grid control in SharePoint 2013?
Hello everyone!
Recently we noticed something funny in SharePoint 2013. While quite many people were hoping to have the datasheet view like those in SP2007 and 2010, Microsoft has chosen a different interface to display datasheet view.
Now, if you try to create a sub site under a publishing site, and use the
Publishing Site template then try to create a datasheet view in the sub site, SharePoint will try to use the Access data grid control to display the view. In some situations the view will display and other situations it will not, and will show this
error:
The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Microsoft SharePoint Foundation is not installed, your browser does not support ActiveX controls,
a component is not properly configured for 32-bit or 64-bit support, or support for ActiveX controls is disabled.
If you create a sub site using Publishing Site with Workflow instead, then the datasheet view will be created properly using SP2013 interface.
Using PowerShell, we can see that both Publishing Portal and
Publishing Site With Workflow are using the BLANKINTERNET 53 template. The
Publishing Site on the other hand is using the CMSPUBLISHING 39 template.
Want to try it out and let me know if that happens to your SharePoint too?Hi Conway,
I tested the issue in my environment per your description and it returned the results as below:
I created a subsite using Publishing site under a team site in SharePoint server 2013, the datasheet view in a list displayed as pic1
I reproduced the issue in SharePoint server 2010, the datasheet view in a list displayed as pic2
It turns out by design the datasheet view in the subsite based on Publishing site template displays as your situation. Here is an article which explains this:
http://www.sharepointblues.com/2010/03/31/data-sheet-view-not-working/
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
Multiple ALV Grids on the same window.
Hi,
Can someone tell me if it's possible to display multiple ALV grids on the same window.If so how is it done.Please note that I am talking about Grid Display and not List Display.
Regards,
Swathi BalakrishnanHi,
This can be done even i have done a report.
Its very simple create three containers as below.
Just repeat three times if u need to create three containers.
See this sample code using custom container.
START-OF-SELECTION.
Begin of process logic
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS01'.
SET TITLEBAR 'SALESTTL'.
A L V G R I D
IF o_grid_container IS INITIAL.
CREATE OBJECT o_grid_container
EXPORTING
container_name = '<b>CCONTAINER1</b>'.
CREATE OBJECT o_grid
EXPORTING
i_appl_events = 'X'
i_parent = o_grid_container.
<b>FOR first A L V G R I D</b>
PERFORM set_grid_field_catalog
CHANGING i_grid_fcat.
PERFORM modify_grid_fcat_predisplay
CHANGING i_grid_fcat.
PERFORM set_grid_layout_set
CHANGING struct_grid_lset.
PERFORM sort_outtable CHANGING i_sort_fcat.
PERFORM populate_grid_data TABLES i_grid_outs i_grid_outs_pro.
SORT i_grid_outs BY year month.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid_lset
CHANGING
it_outtab = i_grid_outs[]
it_fieldcatalog = i_grid_fcat[]
it_sort = i_sort_fcat. " Period
ENDIF.
IF o_grid1_container IS INITIAL.
CREATE OBJECT o_grid1_container
EXPORTING
container_name = '<b>CCONTAINER2</b>'.
CREATE OBJECT o_grid1
EXPORTING
i_appl_events = 'X'
i_parent = o_grid1_container.
*<b> FOR SECOND ALV GRID</b>
PERFORM set_grid1_field_catalog
CHANGING i_grid1_fcat.
PERFORM modify_grid1_fcat_predisplay
CHANGING i_grid1_fcat.
PERFORM set_grid1_layout_set
CHANGING struct_grid1_lset.
PERFORM sort_outtable1 CHANGING i_sort_fcat1.
PERFORM populate_grid1_data TABLES i_grid1_outs i_grid1_outs_pro.
SORT i_grid1_outs BY year month.
CALL METHOD o_grid1->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid1_lset
CHANGING
it_outtab = i_grid1_outs[]
it_fieldcatalog = i_grid1_fcat[]
it_sort = i_sort_fcat1. " Period
ENDIF.
IF o_grid2_container IS INITIAL.
CREATE OBJECT o_grid2_container
EXPORTING
container_name = '<b>CCONTAINER3</b>'.
CREATE OBJECT o_grid2
EXPORTING
i_appl_events = 'X'
i_parent = o_grid2_container.
<b>FOR THIRD ALV GRID</b>
PERFORM set_grid2_field_catalog
CHANGING i_grid2_fcat.
PERFORM modify_grid2_fcat_predisplay
CHANGING i_grid2_fcat.
PERFORM set_grid2_layout_set
CHANGING struct_grid2_lset.
PERFORM populate_grid2_data TABLES i_grid2_outs i_grid2_outs_pro.
SORT i_grid2_outs BY year month.
PERFORM sort_outtable2 CHANGING i_sort_fcat2.
CALL METHOD o_grid2->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid2_lset
CHANGING
it_outtab = i_grid2_outs[]
it_fieldcatalog = i_grid2_fcat[]
it_sort = i_sort_fcat2. " Period
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
As the events are registered as application events, control is first
passed to the program's PAI. The call 'cl_gui_cfw=>dispatch' will
forward control to ABAP object event handling and the appropriate
event handler will be called (if present). This allows the user to
selectively process events.
DATA: i_return_code TYPE i .
CALL METHOD cl_gui_cfw=>dispatch
IMPORTING return_code = i_return_code.
save_ok = ok_code.
CASE save_ok.
WHEN 'BACK' OR 'END' OR 'CANC'.
PERFORM exit_program.
ENDCASE.
CLEAR save_ok.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form EXIT_PROGRAM
text
FORM exit_program.
CALL METHOD o_grid_container->free.
CALL METHOD o_grid1_container->free.
CALL METHOD o_grid2_container->free.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
Error in FLush
ENDIF.
LEAVE TO SCREEN 0.
ENDFORM. " EXIT_PROGRAM
If u want get more idea revert back to me.
Thanks & Regards,
Judith.
Maybe you are looking for
-
ARDAgent error message in Disk Utility
I just got a new 27" iMac 2 months ago and when I recently ran Disk Utility to repair permissions I got this message. Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will n
-
HT2995 Which type of speaker and microphone can I connect to Mac Mini?
I tried headsets with USB and it works but the sound quality is not good I also tried the headset from Apple but that needs to be inserted in the ear which is not recomended from hygene viewpoint So I would like to see suggestions on headset or other
-
Joining bridge ,dim,fact table
Hi I have scenario where I have a bridge table,dimension table,and 2 fact tables. The dimension table is a common table for both fact tables. The bridge table contains the dimension tables Primary key. The bridge is also having an other dimension tab
-
Aggregate function in for loop insert
Hi Everyone, Please see the below code and help me insert these string values. How can I trap that string value and insert it? DECLARE BEGIN for i in (SELECT STRAGG(Q.QUESTION_CODE) FROM QUESTION Q , TEST_CODE_CONVERSION TC
-
Computer wont recognize iphone
i unplugged my iphone4s on accident while it was doing a backup restore in itunes when i plugged it back in a notification popped up saying the device in the usb port is unrecognised because the device has malfunctioned.... how do i fix this