In the name column DataGrid
Hello
I fill a DataGrid with JSON data that comes from a mysql query. I was wondering if it is possible to say a piece of JSON data to one column other than the name there?
My JSON data comes with short names...
[{'gID': 'Rock', 'vID': 'Pub Darby', 'Greek': 'Yes'}]
and I load in my dataGrid data provider...
myDG.dataProvider = new DataProvider (myJSON);
Currently, my columns must be named...
gID, vID, and Greek
for the above data is filled. Is it possible to have more meaningful column names, while keeping the abbrieviated form in the JSON data?
for example...
STYLE OF CONCERT, VENUE, CAN BE SAVED
or have I not choice but to make the full names, part of the JSON as...
[{'CONCERT STYLE': 'Rock', 'PLACE': 'Pub Darby', 'CAN BE SAVED': 'Yes'}]
Thank you
Shaun
of course, you can create a dataprovider that suits your needs:
var obj:Object = {'gID': 'GIG STYLE', 'vID': "PREGNANT", "Greek:"CAN BE SAVED "};
var dpA:Array = [];
for (var i: int = 0; i<>
for (var s:String in {myJSON [i])}
dpA.push({obj[s]:myJSON[i][s]});)
}
}
myDG.dataProvider = new DataProvider (dpA);
Tags: Adobe Animate
Similar Questions
-
Wild search in the name column
Hello
IAM using oracle 11.2
IAM having a query that finds a particular part of the word name
for example
CREATE TABLE TEST123
(type1, varchar2 (10))
LIST1 VARCHAR2 (10),
NAME VARCHAR2 (302).
NAME2 VARCHAR2 (500),
ANAG_NAME VARCHAR2 (2000))
SELECT *.
OF test123
WHERE ='s TYPE1' AND
(LIST1 = "CL"
AND (NAME2 = "AIILN" AND)
(instr (NAME, 'IAN') > 0 AND instr (NAME, 'LI') > 0))
OR LIST1 = 'TT '.
AND (NAME2 = "AIILN" AND)
(instr (ANAG_NAME, ' un ') > 0 AND instr (ANAG_NAME, "L") > 0))
)
the table can contain 2 million records.
I want to replace it with the index ctxsys.
because research is a wildcard search
If use to create indexes ctxsys.context I have to use the CONTAINS clause to find records that I have to use %
and if I create index ctxsys.ctxcat I use CATSEARCH to search for record, I used ' *'
but both takes more time...
However, an error occurs.
Can someone give some suggestion...
Thank you
user
Published by: user9080289 on June 22, 2012 12:10In general, you can create a CONTEXT index on a column, then use CONTAINS instead of the Instr. You can also create a MULTI_COLUMN_DATASTORE on several columns and use a sort of GROUP of SECTIONS, so that you can use a CONTAINS clause and with an index affected research in several columns. You can also use FILTER BY in your index creation, so that you can include columns structured in your index, so that you can use SURLABASEDESDONNEESDUFABRICANTDUBALLAST in your CONTAINS clause, so that your entire query uses one index. You can also use SUBSTRING_INDEX to increase lookup speed when you use wildcard characters. You may also need to increase the WILDCARD_MAXTERMS. If you are looking for a string that is separated by spaces, punctuation or some other delimiter, you don't need wildcards. However, if you search for a string in a Word, then you need wildcards. If you are looking for short strings, then you must be sure to only use a list of empty words that does not include them. If your channels are too short, then you are likely to exceed the WILDCARD_MAXTERMS, unless set you it to 0, while there is no limit, but then this type of query can be very slow and consume a lot of resources. Please see the demo below. I added a column to create the index on, but you can create index on a column of text. The columns that are searched are determined by the columns in the store of data and filtering, not the column in the index in created the.
-test environment consisting of table, data and similar to the original query:
SCOTT@orcl_11gR2> -- table: SCOTT@orcl_11gR2> CREATE TABLE TEST123 2 (type1 varchar2(10), 3 LIST1 VARCHAR2(10), 4 NAME VARCHAR2(302), 5 NAME2 VARCHAR2(500), 6 ANAG_NAME VARCHAR2(2000), 7 names VARCHAR2(1)) 8 / Table created. SCOTT@orcl_11gR2> -- data: SCOTT@orcl_11gR2> INSERT ALL 2 INTO test123 VALUES ('s', 'CL', 'IAN LI', 'AIILN', NULL, NULL) 3 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'AN L', NULL) 4 INTO test123 VALUES ('s', 'CL', 'IANLI', 'AIILN', NULL, NULL) 5 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'ANL', NULL) 6 INTO test123 VALUES ('s', 'CL', 'LIIAN', 'AIILN', NULL, NULL) 7 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'LAN', NULL) 8 SELECT * FROM DUAL 9 / 6 rows created. SCOTT@orcl_11gR2> -- query similar to original: SCOTT@orcl_11gR2> COLUMN name FORMAT A10 SCOTT@orcl_11gR2> COLUMN name2 FORMAT A10 SCOTT@orcl_11gR2> COLUMN anag_name FORMAT A10 SCOTT@orcl_11gR2> SELECT * 2 FROM test123 3 WHERE type1 ='s' 4 AND ((list1 = 'CL' 5 AND name2 = 'AIILN' 6 AND INSTR (name, 'IAN') > 0 7 AND INSTR (name, 'LI') > 0) 8 OR 9 (list1 = 'TT' 10 AND name2 = 'AIILN' 11 AND INSTR (anag_name, 'AN') > 0 12 AND INSTR (anag_name, 'L') > 0)) 13 / TYPE1 LIST1 NAME NAME2 ANAG_NAME N ---------- ---------- ---------- ---------- ---------- - s CL IAN LI AIILN s TT AIILN AN L s CL IANLI AIILN s TT AIILN ANL s CL LIIAN AIILN s TT AIILN LAN 6 rows selected.
-index multi_column_datastore, list of words and text:
SCOTT@orcl_11gR2> -- multi_coumn_datastore and wordlist: SCOTT@orcl_11gR2> BEGIN 2 -- multi_column_datastore: 3 CTX_DDL.CREATE_PREFERENCE ('test123_mds', 'MULTI_COLUMN_DATASTORE'); 4 CTX_DDL.SET_ATTRIBUTE ('test123_mds', 'COLUMNS', 'name, name2, anag_name'); 5 -- worlist: 6 CTX_DDL.CREATE_PREFERENCE ('test123_wl', 'BASIC_WORDLIST'); 7 CTX_DDL.SET_ATTRIBUTE ('test123_wl', 'SUBSTRING_INDEX', 'TRUE'); 8 CTX_DDL.SET_ATTRIBUTE ('test123_wl', 'WILDCARD_MAXTERMS', 50000); 9 END; 10 / PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> -- text index using FILTER BY, multi_column_datastore, section group, wordlist: SCOTT@orcl_11gR2> CREATE INDEX test123_idx 2 ON test123 (names) 3 INDEXTYPE IS CTXSYS.CONTEXT 4 FILTER BY type1, list1 5 PARAMETERS 6 ('DATASTORE test123_mds 7 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP 8 WORDLIST test123_wl 9 STOPLIST CTXSYS.EMPTY_STOPLIST') 10 / Index created.
-query using CONTAINS and SURLABASEDESDONNEESDUFABRICANTDUBALLAST with a single hit index:
SCOTT@orcl_11gR2> SET AUTOTRACE ON EXPLAIN SCOTT@orcl_11gR2> SELECT * 2 FROM test123 3 WHERE CONTAINS 4 (names, 5 'SDATA (type1 = ''s'') 6 AND AIILN WITHIN name2 7 AND ((SDATA (list1 = ''CL'') 8 AND (%IAN% AND %LI% WITHIN name)) 9 OR 10 (SDATA (list1 = ''TT'') 11 AND (%AN% AND %L% WITHIN anag_name)))') > 0 12 / TYPE1 LIST1 NAME NAME2 ANAG_NAME N ---------- ---------- ---------- ---------- ---------- - s CL IAN LI AIILN s TT AIILN AN L s CL IANLI AIILN s TT AIILN ANL s CL LIIAN AIILN s TT AIILN LAN 6 rows selected. Execution Plan ---------------------------------------------------------- Plan hash value: 3044757981 ------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 1435 | 4 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| TEST123 | 1 | 1435 | 4 (0)| 00:00:01 | |* 2 | DOMAIN INDEX | TEST123_IDX | | | 4 (0)| 00:00:01 | ------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("CTXSYS"."CONTAINS"("NAMES",'SDATA (type1 = ''s'') AND AIILN WITHIN name2 AND ((SDATA (list1 = ''CL'') AND (%IAN% AND %LI% WITHIN name)) OR (SDATA (list1 = ''TT'') AND (%AN% AND %L% WITHIN anag_name)))')>0) Note ----- - dynamic sampling used for this statement (level=2) SCOTT@orcl_11gR2>
-
# used in the name column in DB
I'm working with a pre-existing database in which many of the column names contain a sign #. Someone at - it a good solution for this scenario outside of rename column?
Example of name of column: Last_CTR #.
One option is to use an alias.
SELECT [Last_CTR #] AS AliasForBadColumnName
FROM SomeTable
-
Querying the oracle table that has a column with the name of "FILE".
Hi all
I need to have an oracle table that has the column with the name "FILE".
I can query all columns with the query "select * from table".
But I'm not able to use the query "select the table file.
This table is converted from ms access to oracle and I need to have this column with the name "FILE".
Any suggestions?
Thank you
Abdellaoui
Hello
FILE is a keyword from Oracle, so it's not a good name,
Use FILEDATE, or DATE_FILED, or something else that is not in V$ RESERVED_WORDS. KEYWORD as the name column.
If you need to use the FILE, then you must use quotation marks.
-
Find the name of the column in all tables
How to find the name of the column in all tables in the database for any column to reveal the name of the person?
We have over 1000 tables looking for.and in some places, the name column FNAME LNAME, First_NAME, DNAMEFor example we have Customer table, Table EMPLOYEE and the ORDER Table
--------------------------------
Customer table
--------------------------------LNMAE
EMPLOYEE table
EMP_ID
DEPT_NAME (we don't want this column as it is not a name column)
Last_name (he must propose this column because it is named)----------------------------
CONTROL Panel
-----------------------------
ORDER_ID
ORDER_NAME (we don't want this column as it is not a name column)
Last_name (he must propose this column because it is named)-------------------------
Dept table
-------------------------
Dept_ID
DEPT_NAME (we don't want this column as it is not a name column)Please advise...
Thank you.
Hello
What exactly do you do?
If you want to display the tables containing these columns, you can query the view data dictionary USER_TAB_COLS (or ALL_TAB_COLS, or, if you have privileges, DBA_TAB_COLS).
For example:
SELECT table_name, column_name
Of user_tab_cols
WHERE nom_de_colonne IN ('DNAME', 'FNAME', 'FIRST_NAME', 'LAST_NAME', 'LNAME') - or else
ORDER BY table_name, column_name
;
-
After a computer crash, I had to load Thunderbird (v31.3.0) in my computer running Windows 8.1, and I managed to import my address book backup file in Thunderbird (v31.3.0).
My problem is that I don't see an option to sort the address book by name of 'Family', which was available with the version of Thunderbird, I had before the crash.
How can I get the address book to sort by the name of "family"?"Address book".
Select address book
"View' > 'Show name as' > last/first". "You can sort by name.
Click on the 'Name' column header to change the sort order,
Reversed, then click on the 'Name' column header again to reverse the order.Or
'View' > ' sort by ' > select 'Name' and 'Crescent '. -
How to sort the names in order albhabetical in Windows Mail on some recipients?
Original title: Windows Mail
Re my Windows Mail, the "Select recipients" list sorts e-mail addresses in alphabetical order rather than alphabetical order the real names, how can I change this?
Hi sarahsdrive,
Try these steps and check the result.
a. in the Contacts folder: change the display «Détails»
b. right-click on the 'Name' column header, click on "First name", then click on 'Last Name'
c. click on "Last Name" to sort by this order, or click on the title "First Name" to sort by this order.
d. in a window to create a message: click on:
e. click the column 'Name' position... it cycles through 4 different kinds
f. in Contact properties, click on the arrow pointing downwards at the end of the full name boxChange Windows Mail send settings
Visit our Microsoft answers feedback Forum and let us know what you think.
-
The Task Manager does not display the names of process
It is not the function of menu hide tabs and menus but the .exe running list is missing, I checked all the columns on and still no luck, I kill the process from the description column now which is a little *. Someone has an idea of what's going on? P.S. It happened randomly more than two years ago and I tried different sites from time to time to get answers but no luck. O.S.: Windows 7 Home 64-bit
Try this:
Place your mouse pointer on the left side of the user name column. You should get a slider which is a vertical line with arrows on both sides. Drag it to the right (holding the left button of the mouse). You should see the name column of the visible Image.
Answer if the problem persists. -
update the column of type char to stem after insert or update the same column
I have the table "people":
DESC PEOPLE
Name Null? Type
------------------------------- -------- ------------
ID NOT NULL NUMBER
NAME VARCHAR2 (25) NOT NULL
and I need to make sure that the NAME column is always in uppercase letters, so I did as he illustrated in this link:
http://asktom.Oracle.com/tkyte/mutate/
I did this: -.
==================================
CREATE OR REPLACE TRIGGER parent_bi
BEFORE THE INSERT OR UPDATE
ON people
BEGIN
state_pkg.newrows: = state_pkg.empty;
END;
/
-----------------------------------------------------------------
CREATE OR REPLACE TRIGGER parent_aifer
AFTER INSERT OR UPDATE
ON PEOPLE
FOR EACH LINE
BEGIN
state_pkg.newrows (state_pkg.newrows.COUNT + 1): =: NEW. ROWID;
END;
/
------------------------------------------------------------------
CREATE OR REPLACE TRIGGER HR. PARENT_AI
AFTER INSERT OR UPDATE
ON HUMAN RESOURCES. PEOPLE
REFERRING AGAIN AS NINE OLD AND OLD
FOR EACH LINE
BEGIN
BECAUSE me in 1... state_pkg.newrows.count
LOOP
UPDATE of the people
NAME = UPPER (NAME)
People WHERE. ROWID = state_pkg.newrows (i);
END LOOP;
END;
/
======================================
but nothing is coming, as the same that these triggers do not exist.
So, what is wrong?
and how I workaround to make this statement:-
Setting a DAY people SET NAME = UPPER (NAME);
whenever I update or insert in the name column.It is much simpler that that - you just need a BEFORE INSERT trigger
CREATE OR REPLACE TRIGGER your_trigger_name BEFORE INSERT OR UPDATE ON persons FOR EACH ROW BEGIN :new.name := UPPER( :new.name); END; /
As you can see from this example, which will force all uppercase
SQL> create table persons ( 2 name varchar2(10) 3 ); Table created. SQL> CREATE OR REPLACE TRIGGER your_trigger_name 2 BEFORE INSERT OR UPDATE ON persons 3 FOR EACH ROW 4 BEGIN 5 :new.name := UPPER( :new.name); 6 END; 7 / Trigger created. SQL> insert into persons values( 'justin' ); 1 row created. SQL> insert into persons select lower(ename) from emp; 14 rows created. SQL> select * from persons; NAME ---------- JUSTIN SMITH ALLEN WARD JONES MARTIN BLAKE CLARK SCOTT KING TURNER ADAMS JAMES FORD MILLER 15 rows selected.
Also, you generally want to add a check constraint to ensure that NAME = UPPER (NAME).
Justin
-
I have written an application in adf faces and business components, but would like to be able to add items to it simply by creating a view of data base, i.e. with standard names and a suffix, probably static number of columns (just a read only view). I can handle the front-end and logic, but can't see a way to parametise the names & columns in view of component of the business objects. I can do things like create a load of dummy views with 10 passes to say selection double 0 then their chuck in the model, which is a mess, but would work... I was wondering if there's a cleaner way I can achieve through the model or any other method, so any ideas that could point me in the right direction would be useful.
Thanks in advance...
Tim.Hello
You may want to investigate the dynamics of ViewObjects or dynamicaly adding attributes such as 9 and 29 of http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
See also
http://www.bloggingaboutjava.org/2006/04/binding-dynamic-view-object/
Frank
-
Using the name of dynamic column in datagrid selectedItems
Hello
I have a datagrid that is loaded with 2 columns. AllowMultiSelect is enabled.
Based on the values selected at runtime, I get the correspondent selected the name of the column and its values and displays it on the screen of the HTML.
GRP is datagrid
dgrcl is a data grid column
selflds is a table that has values 0,1,2,3
selflds [0] = name, selflds [1] = age
for (var l:int = 0; < grp.columnCount; l ++)
{
dgrcl = grp.columns [l];
selflds [l] = dgrcl.dataField;
}
srhVals will have a single value selected in one point any
get the corresponding name of the selected column and its value
var srhVals:String;
srhVals = String(grp.selectedItem[selflds[1]]);
I'm trying to make the selection above instead in .selectedItems something like below. By doing that, I'll get all selected items, but not a single. If I try under syntax, I get error. Anyone have any ideas on how to make.
srhVals = String(grp.selectedItems.selflds[1]);
Hello
I got my mistake, there should be no point after selectedItems operator;
I found a solution - it goes like this:
for (var g:int = 0; g<>
{
srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);
}
If the whole scenario is like this:
DataGrid:
Name age
a 20
b 30
c 40
d 50
I select b, d in the user interface. At runtime, I get the selecteditem as 'Name' column name programmatically, loops through the selecteditems and store the value in srhVals b, d.
b, d will finally be shown in the user interface.
-
How to get the name of column datagrid in AS3?
In AS2, we can get it to help
myDataGird.columnNames
How about AS3?
the columns in your datagrid property will return an array of datagridcolumns. the property of a datagridcolumn headerText is the name of the column:
for (var i: int = 0; i<>
trace (myDataGrid.Columns [i]. HeaderText);
}
-
How to delete records of name of datagrid, while I'm by selecting one of the check and delete
Hi friends,
I work in flex 4 mxml with action script web application... i use a data grid and a delete button outside the grid.
I have two records in the same name in the grid, when I click on a record in the grid and click on ways to remove this time, both records will delete this grid
including the record with the same name...
How to do this?
any code suggesssion or helpful code snippets...
Thanks in advance,
B.Venkatesan.
Hello
First, get the length of the data grid.
Assume that your datagrid id db and you want to delete the line that have the same name...
first get the line selected and the name of the line selected.
is the chosen name supoose
var index: int = db.selectedindex;
var selname:string = bd.dataprovide.getItemAt (index) .name; (name id column datafield).
now, you research the name chosen for the same lines in the DataGrid.
var totallen: int = (db.dataprovider) .length;
for (var i: int = 0; i<>
{
var checkduplicate:string is bd.dataprovide.getItemAt (i) .name;.
if(checkduplicate==selname)
{
db.dataProvider.removeItemAt (i);
}
}
This will clear all the line who are with the same name with the name of the selected line.
---------------------------------------------------------------------- ----------------------------
Gallot Hiroji | [email protected] | www.isacglobal.com
---------------------------------------------------------------------- ----------------------------
-
You can addItem() when you do not know the name of the column?
I am trying to enter data into a DataGrid via XML. I do not know in advance what will be the names of the columns. I understand that it is supposed to function as:
var sampleItem:Object = {ColName:10};
dataGridMain.addItem (sampleItem);
but it's no help if you don't know what will be the name of the column (column).
Can I replace the value (10) with variables that match my xml values (output.row [0] .col [0]) and it works fine. But if I try to do the same for column name, it doesn't quite work. How can I use a dynamic of the names of columns in the dataGrid?
gr8 to know that you have found the solution...
Alternatively, you can make the dynamic columns same name as the name of the xml tag using dataprovider. Here's a simple example.
****************************************************************************************
var dp:Array = new Array();
var xml =
;
for (var i: int = 0; i
var xmlc:XMLList = xml.track [i] .children ();
var col1:String = (xmlc [0] as XML) .localName () as String
var col2:String = xmlc [1] .localName () as String
var col3:String = xmlc [2] .localName () as String
var obj:Object = new Object();
obj [col1] = xml.track [i] .title;
obj [col2] = xml.track [i] .band;
obj [col3] = xml.track [i] mpfprojectdir\dev10\src\csharp\projectbase.file;
DP.push (obj);
}dg.dataProvider = new DataProvider (dp);
*****************************************************************************************
Kind regards
Karthikeyan R
-
Name covering the sticker in the see column
Hello
I recently had problems with the pictures of the column view. It seems that sometimes the name which is normally displayed on the file begins to display on top of the thumbnail of the file on the far right. It will happen usually after I moved to a new file and a new preview. I will include pictures to illustrate:
Here's an example of what it should look like:
Here is an example of the question:
The question is easy, although temporarily fixed by changing to a different display format, such as list and switch back. I'm more worried that this may be an indication of some sort of bug or problem.
All this began after I had several problems do transfers of data on three different drives, and my phone has restarted following a 'problem '. Please let me know if anyone has come across this problem before, or has any ideas about what may be the issue. I already rebooted my laptop a few times as good viewfinder also restart all leaving the laptop on... Specific computer below information:
MacBook Pro (13-inch, mid-2012)
El Capitan 10.11.5 OSX
Processor: 2.9 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Graphics card: Intel HD Graphics 4000 1536 MB
Let me know if there are any other details necessary to diagnose this problem. Thank you.
Try the start mode by holding down the SHIFT key at startup. Secure boot is quite slow because the operating system performs some cleanup and verification tasks, so give it time. Once you're completely connected, restart normally.
Maybe you are looking for
-
my printer worked with 10 Windows for a year. now, it will not be printed. I downloaded the drivers and they ae stopped by 'koobface '. My state settings that the printer is "offline". The settings say the default setting is 'incomplete due to a me
-
How can I get my pictures from my Bloggie TS10 on a flash drive or a memory stick?
How can I get my pictures from my Bloggie TS10 on a flash drive or a memory stick
-
I have a standard system install CD, which includes Windows + apps + registry settings on a number of standalone PCs. I have product keys Windows for all PCs and licenses for all applications. When I install the system on a new PC, it's the Window
-
How can I reformat my hard drive? I use xp family. __
I need to reformat my hard drive. How can I do?
-
I can't send pictures in my e-mail with windows 7 live mail
When forwarding Emails with photos some photos may be included only in the original e-mail. This includes emails with tiny images that fail, but some with multiple photos are ok