Can select last line of dynamically built DataGrid
It comes, essentually, what I'm doing:
private var dg:DataGrid = new DataGrid();
private var dgCols:Array = new Array();
private var dgArray:Array = new Array();
This section is too simplistic for tests only, it turns out that it was a good thing
var temp: Object = {};
temp [« 1 »] = « a » ;
dgArray.push (temp);
dgArray.push (temp);
dgArray.push (temp);
dgArray.push (temp);
dgArray.push (temp);
Build the columns in the data grid
of the col: DataGridColumn var = new DataGridColumn();
col.dataField = "1";
dgCols.push (col);
CGI Columns = dgCols;
dg.dataProvider = dgArray;
dg.allowMultipleSelection = true;
dataGridHolder.addElement (dg);
Nothing is really that the complex and datagrid generates very well. The problem that I am running is that whenever I scroll on the data grid, only the last line becomes highlighted. If I did the editable datagrid, I can select lines, other than the last of them and modify them, but only the last row is highlighted. If I build a datagrid is created at compile time, I do not understand this problem, I can highlight and select all the different lines and even several lines.
Someone at - he no clue as to what is happening and how to fix it?
List MX classes require that are unique to each dataprovider item. You have
put the same point there several times.
Tags: Flex
Similar Questions
-
Sort the columns dynamically built DataGrid...
Hi people...
usually, I'm building my DataGrid dynamically... with something like this:
... omissis...
SQLstatement.text = "SELECT name, address FROM myDBTable";
SQLstatement.execute ();
resultSQL = SQLstatement.getResult ();
MyArrayCollection.source = resultSQL.data;
myDataGrid.dataProvider = MyArrayCollection;
... omissis...
and it works perfectly... the problem is that resultSQL.data, by default, is a table sorted by "abc" (ehmmm... in English is alphabetical sorting?).
Could, I want the same sort of my query, where the NAME came before the ADDRESS...
Is there a solution?
I don't want to pre-build a datagrid with all columns... because it cancels my dynamic datagrid features...
Thanks for all help...
bye bye ^ _ ^.
Thanks for your advice ntsiii :))
but now I use a SQLite database... so I prefer using Flex function...
but I tried a solution (Pentecost of google of course help)the idea is the following:
Once completed this datagrid, I copy dg.colums to a temporaney tempArray...
can I swap the columns that are not in the right place... and in the end, I put dg.columns = tempArray...I tried this method time ago... but it did not work because I tried to change directly from db.columns [x]...
Now, I'm convinced!
Bye bye
-
I am running XP. I have a video camera with microphone input via USB. When this device is connected I can't select other audio inputs when using any audio software. I can't select Line In, Line Out, or Wave In for example. If I remove this device, these features can be selected. Why XP doesn't allow you
Select the activation of a USB device. Thank you * address email is removed from the privacy *.Hello
I suggest you to follow these steps and check if that helps:
a. Click Start, go to control panel.
b. Select sounds and Audio Control Panel devices.
c. on the Audio tab, change the default recording device.
d. the options to select the specific entry should be available later.
e. Select and click on apply and ok
It will be useful.
-
I have a table that stores the information detailed transactions for a device. Each device has multiple lines as various attributes are changed. One of the fields in this table contains a date of update
How can I select a whole line of unique for each device when the update date is the latest date
I tried doing a group by the number of device but I get an error when I try to include in the select fields that are not part of the training group.
Clues on how I should approach this problem.
Select M.BI_INST_CODE, max gen_bitmetrtable M of M.BI_INST_CODE Group (M.bi_date_chng);
It gives me a field, but I want
Select M.*, max (M.bi_date_chng) of the gen_bitmetrtable M of M.BI_INST_CODE group;
Published by: 896596 on December 15, 2011 16:24
Published by: 896596 on December 15, 2011 16:25
Published by: 896596 on December 15, 2011 16:26Select M.BI_INST_CODE, max gen_bitmetrtable M of M.BI_INST_CODE Group (M.bi_date_chng);
* NOT TESTED *.
SELECT the M gen_bitmetrtable M.*
WHERE (M.BI_INST_CODE, M.bi_date_chng) = (SELECT M1. BI_INST_CODE, MAX (M1.bi_date_chng)
OF gen_bitmetrtable M1
WHERE M1. BI_INST_CODE = M.BI_INST_CODE GROUP BY M1. BI_INST_CODE);Who help me?
-
SQLite Select * from table1 - cannot see last line
Hello
I did some testing with SQLite component on the Simulator and ran into a problem. When I try to retrieve the data from the database (storage works great... open the db to an observer and data file has been stored properly), I can't get the last line of the query. I have something in the sense of the following:
try { Statement _statement = m_db.createStatement("SELECT * FROM TABLE1"); _statement.prepare(); _statement.execute(); Cursor _cursor = _statement.getCursor(); if (_cursor != null) { while (_cursor.next()){ Row _row = (Row)_cursor.getRow(); // Read row. For example: int idx1 = _row.getColumnIndex("id"); int idx2 = _row.getColumnIndex("name"); String _id = _row.getString(idx1); String _name = _row.getString(idx2); } } _statement.close(); _cursor.close(); } catch (Throwable e) { Dialog.alert("unable to get row data"); }
The first problem is that _cursor.next does not succeed, and the loop is not executed. If I change the code to force it to enter the loop (ie. cursor.first and run the .getPixel etc... in any case), I always get the LAST row, even when I use the position (1, 2, 3, 4... etc) function. It's pretty boring. I develop this 5.0 and testing with 9700 Simulator. Any ideas why I would see only the last row?
Why the next file in the thropugh code above, I can't retrieve a row in the database?
Note I tried dogin cursor.first ()... . Run the .GetPixel and the. next(), don't always gets me the line after line and the other always returns false. I do a select empty in the database, all lines should be there (checked the structure of data in another program... it is fine), no idea why it isn't here?
Thanks in advance.
Figured this out, the _statement.execute (); should not be there.
-
Dynamically select all the rows in a DataGrid
Is there a simple way to select all the rows in a DataGrid dynamically? I want to select all the lines as soon as the DataGrid control is created.
Thank you!
Lee
This code should answer your question.
If this post has answered your question or helped, please mark it as such.
-
Can change us line selected in ADF without using click to edit table feature.
JDEV 12.1.3.0
Hi Experts,
Is there a way we can select a row in the table and click the button change the Panel collection. While the row becomes editable.
Whatever row, we select and click on the edit button. This line becomes editable thattime only. Otherwise always disabled.
Without using click to modify the ADF table feature.
Thank you
AR
I had similar usecase
Maybe you can tweek this blog to meet your needs
Born in DeBug: press the Edit button to make editable line Table.
-
How can disable us the selection of lines under condition
Hi Experts,
JDEV version 12.1.3.0
How can disable us the selection of lines under certain conditions.
As the lines newly unregistered should be allowing the selection of lines.
Saved lines should be disabled from the selection.
Can achieve us.
Please me advice accrdingly
Thank you
Roy
You are implementing a generic selection as shown here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf Manager in this handler, you check and validate the selection of our not.
Timo
-
How can I update the last line in a file.
Hello
I need to add text that should be on the 2nd last line of a text file. I get the last line using RandomAccessFile and surroundings,
updated the code above, I'm trying to add the text to the last line. But instead of add, the above code simply replaces the last line.fileHandler.seek(fileHandler.length()-1-lastLine.length()-1); fileHandler.writeUTF("last_line\r"+lastLine.replaceFirst("0x00", "0x80"));
How to solve this problem?
BR
UmerJust by adding a single line to rewrite the entire file may not be a good idea eapscially when the file is in MBs. so that is the reason why I use RandonAccessFile,.
You don't know that? HDs store files on several trays at the same spot on the Board, so you won't lose anything in rewriting.
I have also an other question. In other words, how I can I know the last line is achieved using PrintWriter?
Steps to follow:
1. read the entire file into a string
2. parse the string by using the String.lastIndexOf ("\n") to the last character of line break.
3. use printwriter to write the string up to the last line (use string.substring), then give your new data, and then enter the second part>
BR
Umer -
Dynamic action - set a value of element based on the selection of lines of report
Hi people,
Does anyone have an example how to set up a dynamic action, which could fill an element with the selected ID based on the selection of line of the report on the same page?
Demo:
http://Apex.Oracle.com/pls/Apex/f?p=19543:2
If I select an item in the report, then I would fill in 'Selected ID' element with the value of the selected report EMPNO line.
Later, I would use it for the display of parts of master / detail on the same page.
Thank you very much
TomasFor this sample page, add the following JS code to run when the page is loaded.
$('.highlight-row td').click( function(){ //fetch record id from the cell contents of first column in row id = $(this).parent().children('td:eq(0)').text(); //set page item to selected id $('#P2_SELECTED_ROW').val(id); });
-
> Now I'm unlable to select more number of lines that are not a sequence in a single page to copy the data rows and paste somewhere in one fell swoop.
> Is this concept implemented in Windows 7. ?
> Is there a provision (method) to select several lines that are not continuous across the keyboard or the mouse in windows 7?Byagaris,
It depends on what program you are trying to copy and paste into. You are able to select continuous, multiple lines, by using the Ctrl Key and clicking, or by highlighting the desired line. For example, I held the Ctrl key and then, using the mouse, has highlighted several different phrases in the various paragraphs, and could then copy them. This feature is available for several versions of windows.
If you are not able to perform this action then post what happens when you try and what program you try it.
Mike - Engineer Support Microsoft Answers
Visit our Microsoft answers feedback Forum and let us know what you think. -
How to set the text in the last line of the table to be bold
Hi all
I have two tables in the report on my page and I would like to have the last line of the table as a "BOLD" text data.
I found a jQuery selector to select the last row of the table, but I do not know how to implement it in the Apex. I want to control what table will have changed last row and who won't.
Could someone help me how to create a dynamic action to accomplish, or if y at - there another solution?$("tr:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
My test app:
user name: [email protected]
passwd: kurintest
appl: REPORT_APPL 12451
Thanks in advance,
JiriNico Martens wrote:
PS: If you worry about sql plsql context switching, use a box instead of my function. Which probably could increase performance.
Using this technique , analytics, and casewould be more effective and offer the best separation of concerns:
Source report
select product_id , sum(quantity_on_hand) qty , avg(quantity_on_hand) avg , case when count(*) over () = row_number() over (order by product_id nulls last) then 'bold' else 'normal' end font_weight from oehr_inventories group by rollup(product_id) order by product_id nulls last
HTML column expression
#PRODUCT_ID#
Avoid generating HTML in the query when it is possible that its impact on the ability to use the features of declarative report as column sorting and setting in the form. (See examples on page 3)
If you have a table with 100 rows and you show only 15 lines. Do you want the 15th line "BOLD" or just line 100Le.
It is really the important issue here. If the reports do not use paging and always show all lines, then it's trivial to implement using dynamic Action (as shown on page 2):
H4. WhenEvent: After refresh
Selection type: jQuery Selector
jQuery Selector: .report-standardH4. Real Action
Action: Run the JavaScript Code
Fire on loading the Page: Yes
Code:$(".report-standard tr:last-child td").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
(Here is to use appropriate DA / jQuery selectors to make sure that only reports including totals get this formatting applied...)
For more complex presentations, a report of custom line model is the way forward, as in the link in the previous thread of the OP: + {: identifier of the thread = 2436912} +.
Also note that the columns hidden, based on the GROUP_ID/GROUPING/GROUPING_ID functions are very useful in these reports. They can be used to report conditions of line to avoid the additional conditions to be ready in the query (as in the case above) and provide the break several levels of formatting.
-
Insert several lines with dynamic data
Hello
When I do an insert into a table that has several lines of dynamic information. on
a page, it inserts all rows that are dynamically filled. I want only what he
to insert the lines that I choose the initials on. How can I do? Let's say I
have 5 items that are displayed on a page and I want to insert only original
the first 2 because the last 3 are left blank, how should I do this? I tried
implementation of an if statement that says:
< cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
Then make the insertion in the table
< cfelse >
< / cfif >
I have this game were also up in a loop that says:
< cfloop index = "help" list = "" #form.listofids # "delimiters =",">"
Here is the code for just the insertion. I also have a code here
Update another table. I got this to work, so I just try to get the insertion
works fine for the moment. I can not use this where the query statement:
Where ItemID = #id # because I'm trying to insert into the table of approval, not
the items table. The table is just updated with some other info. in
a few other input boxes.
< cfloop index = "help" list = "" #form.listofids # "delimiters =",">"
< cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
< cfquery Datasource = '#application. DataSource #">"
Insert into accreditation (APV_ItemID,
APV_ECID,
Document_Type,
Approval_Initials)
Values (' #Evaluate ("form.) (' ItemID # help # ") #',
' #Evaluate ("form. ("ECID # help #") #',
< cfif isDefined (form '. ') ("Help of # PNR_Doc_Type # ') and
"form. "Help of # PNR_Doc_Type #" NEQ "" > "".
' #Evaluate ("form. ("Help of # PNR_Doc_Type # ') #',
< cfelse >
NULL,
< / cfif >
< cfif isDefined (form '. ') ("Help of # PNR_Approval_Initials # ') and
"form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
' #Evaluate ("form. (Aide de # PNR_Approval_Initials #») #
< cfelse >
Null value
(< / cfif >)
< / cfquery >
< / cfif >
< / cfloop >
On the page display, just a table of dynamic info. Here are the 4
things that I have on this page that needs to be inserted to the database.
< input type = "hidden" name = "' ECID #ItemID #" value = "#ECID #" > "
< input type = "hidden" name = "' ItemID #ItemID #" value = "#ItemID #" > "
< input type = "hidden" name = "" PNR_Doc_Type #ItemID # ' value = "PNR Req" > "
< td align = "center" >
< cfif Approval_Initials is not "" > "".
#Approval_Initials #.
< cfelse >
< select name = "PNR_Approval_Initials #ItemID #" >
< option value = "" > select initials < / option >
< cfloop query = "ShowInitials" >
< Cfif Engineer_Initials EQ 1 >
< option value = "#Initials #" > #Initials # < / option >
< / cfif >
< / cfloop >
< / select >
< / cfif >
< table >
Can someone help me please on just the insertion in the database so that it
will insert on the lines that I chose the initials on and not others? Thank you.
AndyYou almost managed, but I see that you have commented.
(" The help of # PNR_Approval_Initials # ') AND form ["PNR_Approval_Initials # help #" ""] NEQ "" > Do things here
-
SQL to bring the last line and the just previous row in the table
Hi all
I have a table of orders, where a serial number can be booked with different number several times over several days.
Requirement is to bring the last order (based on the date of creation) number associated with this serial number and just previous order number and data in the format below.
Last order number Serial number Reservation location No booking Previous order number Serial number Reservation location No booking It is essentially to generate the report that a reserved serial number with how many times with different orders and report must contain details of order two in a line.
Kind regards
You asked for the last line, and you have not provided data of the example or the expected results, so you get what you asked for.
You may be looking for data to be partitioned on another value, for example
SQL > ed
A written file afiedt.buf1. Select deptno, ename, empno, mgr, hiredate, prev_empno, prev_ename, prev_mgr, prev_hiredate
2 starting at)
3. Select deptno, ename, empno, mgr, hiredate
lag (empno) 4, over (partition by deptno arrested by hiredate) as prev_empno
lag (ename) 5, over (partition by deptno arrested by hiredate) as prev_ename
lag (mgr) 6, over (partition by deptno arrested by hiredate) as prev_mgr
lag (hiredate) 7, over (partition by deptno arrested by hiredate) as prev_hiredate
8, case when hiredate = max (hiredate) on (deptno partition) then 1 0 otherwise fine as max_hiredate
9 of PEM
10 )
11 * where max_hiredate = 1
12.DEPTNO EMPNO, ENAME MGR HIREDATE PREV_EMPNO PREV_ENAME PREV_MGR PREV_HIRED
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
10 7934 MILLER 23/01/1982 7782, 7839 KING 17/11/1981
20 7876 ADAMS 7788 23/05/1987 7788 SCOTT 7566 04/19/1987
30 7900 JAMES 7698 03/12/1981 7654 MARTIN 7698 28/09/1981who is the last disc, by Department, as well as the previous within the same Department.
-
Tabular forms – test whether cursor/focus in the last line (Apex 5.0)
I would like to optimize my sub fast data entry form. I have already added dynamic actions for Excel style and down navigation with up and down keys and also auto-insert new line when you press enter on the last field.
The last thing that I want to achieve is to creata a dynamic action trigger that fires only when cursor is in the last row of tabular presentation. I tried to do that with the function. is() JS, but without success.
Is there a way to test whether the current row (the row with focus) is the last line in the form of tables?
Yes, look that I wanted to accomplish was that, if the cursor is in the last line (column_name1) that if the user presses THE button the last row is deleted and cursor is focused on the previous line (column_name2).
After numerous tests that would be a DA who works for me:
Event: Down key
Selection type: jQuery Selector
jQuery selector: .column_name1
Condition: Expression JavaScript: (event.keyCode = $. ui.keyCode.UP) & (.closest("tr").is$ (this.triggeringElement) (": last-child"))
Code:
$(this.triggeringElement).closest("tr").remove ();
$('input.column_name2:last').focus ();
Maybe you are looking for
-
No download file click on downloads, arrow and go to bookmarks and nothing is there at - it how do the downloads folder to return in the drop down menu top-right arrow here's a jing video to question how can I get my downloads folder to the drop-down
-
9.3.2 and xfinity tv remote iOS app
My Xfinity TV Remote App had several channels deleted after that I installed on my iPhone iOS 9.3.2 6 +. Comcast told me they had reset my account and I should delete the app and download a new one. But I can not download a new application, it starts
-
Home page keeps coming back on MSN despite my resetting
The past several times Firefox was closed and restarted (sometimes), the homepage appears as MSN instead of my usual home page. I go into the Tools/General and want to return to my home page and it works for this session, but the next time Firefox re
-
How do I favorite at import from Internet Explorer 9 when no solution posted works?
I have a new windows computer running Windows 7 64-bit. When I click Import Favorites from another browser, all good deeds seem to happen, but there is no Favorites here when I open the bookmarks toolbar and tab. I have reviewed the proposals of solu
-
Equium L20 - same scalability as Satellite L20?
Hello... I want to expand my satellite phone with a better battery and stuff just general for her. As RAM etc. It's the Web site contains next to NO options for my Equium L20 - 197.After having looked up a bit... the Satellite is located very close t