FB4b1: Datagrid with data driven Combobox

Hi,
I would like to implement a datagrid with a datadriven combox in FB4b1.
The database should store "only" values, but should show a different labeltext in the grid.
When the users load this Grid the stores values should be uses to set the comboboxes.
That sounds easy but I haven't found a easy way to implement that!
1.) I need to overrite the "save column" function, so that the shown labeltext is not saved, but its db-values.
How can I do this?
2.) I need to build the combox in the datagrid, but there is nnothing like"combox.value="myValID" ( that would be all in vb.net)
Do I have to loop manually over the selectedIndex until I found my savedValue?
Like
http://www.boyzoid.com/blog/index.cfm/2006/11/22/Flex-Custom-Components-and-Custom-Methods
Is there an easier way to do this?
Thanks for any pointers!
Martin Zach

Each item in comobobox has a label and a data value associated with it.
The following should work if you were to access data of a selected combo box item, without looping through the items. If it is a string value then
mylabel.text = myCombo.selectedItem.data.toString() would show / store the associated data with the combobox item for the label text, you can replace mylabel with the datagrid's dataprovider for your requirements.
Hope this helps
-Sunil

Similar Messages

  • Help With Date driven report

    I am trying to generate a list of the programs on all channels for a specific day showing the channel number, supplier, package, program name, rating code, and show time. This will be similar to a program guide, only not package specific. This is a date-driven report, therefore it should only display programs for a single date specified.
    [code/]SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGDESCRIPT AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE S.PROGTIME='18-DEC-10'
    ORDER BY C.CHNUM
    Which gives me an undesired resulT containg rows that put names of all channels with each channel number and ends up outputting 3016 rows which there should be only 29.
    I don't know how to add my script file here since there is no option for an attachment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Ok here is my syntax I have been working on
    SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGCODE AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE C.CHID=S.CHID
    ORDER BY C.CHNUM;
    Here are the tables and data
    CREATE TABLE CHANNEL_TYPES(
    CHANTYPEID CHAR(10) NOT NULL,
    CHANTYPEDESC VARCHAR2(15) NOT NULL,
    PRIMARY KEY(CHANTYPEID));
    CREATE TABLE SUPPLIERS(
    SUPID NUMBER(4) NOT NULL,
    SUPNAME CHAR(4) NOT NULL,
    SUPSTADD VARCHAR2(30) NOT NULL,
    SUPCITY VARCHAR2(30),
    SUPSTATE CHAR(2),
    SUPZIP NUMBER(9),
    CONTNAME VARCHAR2(30) NOT NULL,
    CONTPHNUM VARCHAR2(15),
    CONTEMAIL CHAR(50),
    PRIMARY KEY(SUPID));
    CREATE TABLE RATING(
    RATINGID NUMBER(4),
    RATINGDESCRIPT VARCHAR(30),
    RATINGCODE VARCHAR(10),
    PRIMARY KEY(RATINGID));
    CREATE TABLE PACKAGE(
    PKGID NUMBER(6) NOT NULL,
    PKGDESC VARCHAR2(40) NOT NULL,
    PKGNAME VARCHAR2(15),
    PKGPRICE NUMBER (8,2),
    PRIMARY KEY(PKGID));
    CREATE TABLE CHANNELS(
    CHID NUMBER(5) NOT NULL,
    CHNUM NUMBER(3) NOT NULL,
    CHNAME VARCHAR2(20) NOT NULL,
    CHANTYPEID CHAR(10) NOT NULL,
    PRIMARY KEY(CHID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID));
    CREATE TABLE PROGRAM(
    SUPID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR2(20),
    PROGDESC VARCHAR2(30) NOT NULL,
    PROGLGTH NUMBER(4),
    CHANTYPEID CHAR(10),
    RATINGID NUMBER(4),
    PRIMARY KEY(PROGNAME),
    FOREIGN KEY(SUPID) REFERENCES SUPPLIERS(SUPID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID),
    FOREIGN KEY(RATINGID) REFERENCES RATING(RATINGID));
    CREATE TABLE SCHEDULE(
    SCHEDID CHAR(6) NOT NULL,
    CHID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR(20) NOT NULL,
    PROGTIME DATE NOT NULL,
    PRIMARY KEY(SCHEDID),
    FOREIGN KEY(PROGNAME) REFERENCES PROGRAM(PROGNAME));
    CREATE TABLE CHANNEL_PACKAGE(
    CHID NUMBER(5) NOT NULL,
    PKGID NUMBER(6) NOT NULL,
    FOREIGN KEY(CHID) REFERENCES CHANNELS(CHID),
    FOREIGN KEY(PKGID) REFERENCES PACKAGE(PKGID));
    --INSERT STATEMENTS
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 4578, 'NBC', '10880 WILSHIRE BLVD #1200', 'LOS ANGELES','CA','90213','JEFF KING','310-369-5231','[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 5267, 'ABC', '26547 STARS BLVD #5699', 'LOS ANGELES','CA', '90212', 'JACK CAVERISI', '310-840-9966', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 7137, 'FOX', '10960 WILSHIRE BLVD', 'LOS ANGELES','CA', '90213', 'JANIS CARMIKEL', '310-235-5233', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 3549, 'WB', '3701 W. OAK ST', 'BURBANK', 'CA','91125', 'SIMON PHILIPS', '310-532-6588', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 6389, 'STAR', '3291 GOLDEN LN.', 'BURBANK', 'CA', '91124', 'SOPHIA SLERPY', '310-677-9511', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5729, 'CNN', '579 WALNUT ST. #7893', 'LOS ANGELES', 'CA', '90215', 'MILDRED FOLLEY', '310-729-5568', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5376, 'CBS', '3499 SURVIVOR CR.', 'BURBANK', 'CA', '91125', 'SHANNON MYERS', '310-648-1064', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7763, 'TBS', '95 TURNER BLVD.', 'ATLANTA', 'GA', '26478', 'ALEXIS COUPE', '443-752-7335', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (3675, 'LIFE', '9945 SAILOR LN.', 'NEW YORK', 'NY', '36984', 'KRISTIAN HART', '646-985-8998', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (2599, 'CW', '55890 TERRANCE DR', 'NEW YORK', 'NY', '36983', 'NANCY BOTWIND', '646-736-7349', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (8771, 'MTV', '7721 TIMES SQ. #98654', 'NEW YORK', 'NY', '36983', 'KID ROCK', '646-992-1257', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7700, 'G4', '87264 GEEK LN.', 'NEW YORK', 'NY', '36983', 'OLIVIA MUNN', '646-753-7312', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (6666, 'FEAR', '666 ELM ST.', 'SLEEPY HOLLOW', 'NY', '36907', 'FREDDY KRUGER', '646-568-9666', '[email protected]');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0001, 'GENERAL AUDIENCE', 'G');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0002, 'PARENTAL GUIDENCE', 'PG');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0003, 'PARENTAL GUIDENCE 13', 'PG13');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0004, 'RATED', 'R');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0005, 'NO ONE 17 AND UNDER ADMITTED', 'NC17');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0006, 'MATURE', 'M');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0007, 'NUDITY', 'N');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0008, 'LANGUAGE', 'L');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0009, 'MILD VIOLENCE', 'MV');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0010, 'VIOLENCE', 'V');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0011, 'SEXUAL CONTENT', 'SC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('M', 'Movie');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('N', 'News');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('L', 'Lifestyle');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('D', 'Documentary');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('S', 'Sports');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('R', 'REALITY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('C', 'CHILDREN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('F', 'FAMILY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('H', 'HORROR');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('I', 'INSTRUCTIONAL');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MU','MUSIC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MYST', 'MYSTERY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('NA', 'NATURE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('RE', 'RELIGOUS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('ROM', 'ROMANCE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SCIFI', 'SCIENCE FICTION');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SO', 'SOAP OPERAS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('TS', 'TALK SHOW');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('W', 'WESTERN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('AD', 'ADULT');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('BIO', 'BIOGRAPHY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('CART', 'CARTOONS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SHOP', 'SHOPPING');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1001, 1, 'Movie Channel 1', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1002, 2, 'StarZ', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1003, 3, 'FOX News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1004, 4, 'Real News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1005, 5, 'Lyfetiem', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1006, 6, 'FIT TV', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1007, 7, 'Gumshoe', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1008, 8, 'Reality Everything', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1009, 9, 'Pure Gridiron', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1010, 10, 'NESN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1011, 11, 'GAMESHOW NETWORK', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES ( 1012, 12, 'HSN', 'SHOP');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1013, 13, 'CARTOON NETWORK', 'CART');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1014, 14, 'ONE LIFE', 'BIO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1015, 15, 'MY MUSIC', 'MU');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1016, 16, 'HEAVENLY TV', 'RE');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1017, 17, 'GUNSLINGER', 'W');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1018, 18, '24-7 TALK SHOWS', 'TS');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1019, 19, 'SOAPNET', 'SO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1020, 20, 'WBFF20', 'MYST');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1021, 21, 'ABC FAMILY', 'F');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1022, 22, 'LOVETV', 'ROM');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1023, 23, 'SYFY', 'SCIFI');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1024, 24, 'OUTDOORS', 'NA');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1025, 25, 'DIY', 'I');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1026, 26, 'CHILLER', 'H');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1027, 27, 'REALTV', 'R');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1028, 28, 'ESPN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1029, 29, '5STAR', 'M');
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(4578, 'N', 'NBC Tonight', 'News from around the world', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(7137, 'L', 'Sale of the Year', 'Game Show Lifestyle', 24, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(3549, 'M', 'Fly Killers are Back', 'Flies attack the city once', 175, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (5267, 'N', 'FOX ACTION NEWS', 'LOCAL NEWS', 60, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6389, 'M', 'MR. NICE GUY', 'MR.NICE GUY SAVES THE DAY', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'L', 'COOKING WITH FOOD', 'PREPARING A HOLIDAY FEAST', 180, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'STEELERS VS RAVENS', 'FOOTBALL', 240, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5376, 'S', 'US OPEN', 'CHAMPIONSHIP TENNIS', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7700, 'D', 'HISTORY VIDEO GAMES', 'THEN AND NOW', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'D', 'A WORLD AT WAR', 'WWII DOCUMENTARY', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'L', 'WHEEL O TERROR', 'GAMESHOW', 60, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'SHOP', 'DEAL OF THE CENTURY', 'SHOPPING', 240, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'C', 'SCOOBY DOO', 'SCOOBY AND GANG', 60, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'BIO', 'MS13 GANG', 'INSIDE THE MS13 GANG', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'MU', '#1 VIDEOS', 'TODAYS HOTTEST VIDEOS', 300, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'RE', 'SCRIPTURE READING', 'REV.DEAK READS ',120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (7700, 'W', 'GUNSLINGER', 'SHOOTOUT IN THE OLD WEST', 60, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'TS', 'JERRY SPRINGER', 'RELATIONSHIP BREAKUPS', 60, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 4578, 'SO', 'GENERAL HOSPITAL', 'SOAP OPERA', 120, 0006);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7137, 'MYST', '48 HOURS', 'WHO KILLED JIMMY HOFFA', 60, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'F', 'FULL HOUSE REUNION', 'STARS FROM FULL HOUSE REUNITE', 120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'ROM', 'CUPIDS ARROW', 'LOVERS IN LOVE', 30, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'SCIFI', 'WAREHOUSE 13', 'NONE AVAILIBLE', 60, 0005);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'NA', 'DEER HUNTER EXTREME', 'HUNTING', 120, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'I', 'FIXING THE SINK', 'HOW TO FIX LEAKY SINK', 60, 0008);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6666, 'H', 'SAW XX', 'RELENTLESS PSYCO KILLS AGAIN', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'AD', 'VICTORA FASHION SHOW', 'MODELS', 60, 0007);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'UFC 300', 'PRO MMA', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'M', 'NOT HOME ALONE', 'NONE AVAILABLE', 120, 0002);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1005, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 4);
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1101', 1001, 'NBC Tonight',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES (1102, 1002, 'Sale of the Year',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1103', 1003, 'Fly Killers are Back',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1104', 1004, 'FOX ACTION NEWS',TO_DATE('18-DEC-10 18:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1105', 1005, 'MR. NICE GUY',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1106', 1006, 'COOKING WITH FOOD',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1107', 1007, 'STEELERS VS RAVENS',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES('1108', 1008, 'US OPEN',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1109', 1009, 'HISTORY VIDEO GAMES',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1110', 1010, 'A WORLD AT WAR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1111', 1011, 'WHEEL O TERROR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1112', 1012, 'DEAL OF THE CENTURY',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1113', 1013, 'SCOOBY DOO',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1114', 1014, 'MS13 GANG',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1115', 1015, '#1 VIDEOS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1116', 1016, 'SCRIPTURE READING',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1117', 1017, 'GUNSLINGER',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1118', 1018, 'JERRY SPRINGER',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1119', 1019, 'GENERAL HOSPITAL',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1120', 1020, '48 HOURS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1121', 1021, 'FULL HOUSE REUNION',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1122', 1022, 'CUPIDS ARROW',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1123', 1023, 'WAREHOUSE 13',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1124', 1024, 'DEER HUNTER EXTREME',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1125', 1025, 'FIXING THE SINK',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1126', 1026, 'SAW XX',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1127', 1027, 'VICTORA FASHION SHOW',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1128', 1028, 'UFC 300',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1129', 1029, 'NOT HOME ALONE',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));

  • HELP Filling a datagrid with data from various tables

    MHI, this is simple.
    I have 2 tables.
    ORDERS and CLIENTS.
    table ORDERS are columns:  order_id, client_id, status
    table CLIENTS are columns: client_id, client_name
    my datagrid would have the columsn: order_id, client_name, status.
    Thats all. I can't simply do it in Flex. HELP PLEASE.
    These are my approaches:
    1 - tried to create a new array collection with mixed data from these 2 tables to use as dataprovider in the datagrid.
    even the ac is [Bindable], the datagrid won't update. Probably Im creating the ac in a wrong way.
    2 - tried to use the ORDERS table call responder lastResult property (that works out to fill the data grid) and add a new colounm (client_name) within each item inside the ORDERS array collection.
    I'm not able to ADD a property/field/column inside the ac.  Of course, when I use .addItem, it will create a new "order"  not a new "order.property"
    if something like:  ac.source[i].push({client_name:clientName}) worked...
    My goals are simple. To fill the datagrid with those data.
    Ah.. i almost forgot...
    supose CLIENTS have 1000 registers.
    I don't have to bring all those registers within flex to look for only one ID to retrieve a name to fill the orders datagrid, right?
    THANKS A LOT
    btp~

    Ok,  this is my first approach:
    this function is an auto-generated event that happens when I drag a databank operator over a datagrid. Datagrid's dataprovider IS set to "orders":
    (in my browser, the following messed lines only show decent while editting. Maybe copy it into a editor to better visualize: )
    protected function getOrders_pagedResult_resultHandler(event:ResultEvent):void             {                 orders = getOrders_pagedResult.lastResult                          //1 - this was previous declared as a Bindable Array Collection.                                             var ta:Array = new Array;                                 for (var t:String in event.result)                 {                     var tp:Array = new Array();                        tp.push(getOrders_pagedResult.lastResult[t].order_id);        //is it any difference to get data like in THIS LINE                           tp.push(event.result[t].status)                               //or THIS?                                             var cn:String = getClientsByID(event.result[t].client_id);     //this won't work in time. The getClientsByID delays to get data.                     var obj:Object = {client_name:cn};                             //so cn, in this line, will be "null". How can I handle this?                                         tp.push(obj);                                         ta.push(tp)                  }                                 orders.source.push(ta)                                             //this is what I wanted datagrid to show, but it doesn't.                                                                                    //if I leave the first statement, everything above is ignored                                                                                    //if I comment the first line, datagrid shows nothing.                            } 
    I realize that the code above won't work because the properties inside each item won't have a "label" to datagrid to call in dataField property...I don't know how to do that. I thought by creating an object (like the obj above) it would work...  it wont.
    My getClientsByID is a modificated auto-generated function which doesn't work properly:
    (in my browser, the following messed lines only show decent while editting. Maybe copy it into a editor to better visualize: )
    protected function getClientsByID(itemID:int):String {         getClientsByIDResult.token = clientsService.getClientsByID(itemID);         return(getClientsByIDResult.lastResult.name); } 
    It seems it doesn't work (returns null) because the function runs faster than the call responder result.
    Creating a listener for everything seems to be not the best practice, but a band-aid...
    Again.
    I should create a class in php to return the "ready-to-use" data. Ok?
    Thanks a lot for your comments. Do I miss any important part of the code?
    Btp~

  • Working with Date-driven content

    At the company I work for, we're getting into doing a lot of banners which are date-driven utilizing an XML doc as the asset.  Of course, for testing purposes, the only method I know in which to test to make sure that the data is populating correctly is to change the date on my machine.  There are obviously a world of annoyances that come up with changing the date and time on your machine (Outlook, Mail, Time Machine, etc). 
    The question I have is if there is another way of being able to do this?  Is there a widget out there?  I've considered traces but I don't know what to trace and would it even matter if I'm looking for response to a future date v. the current date?
    Any ideas?

    So your content reads the systems local time and generates a banner based upon that from the XML content?
    Easiest thing to do, if you have access to the code, is modify the line of code that retrieves the date and set it explicitly:
    http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f10.html#WS5b3cc c516d4fbf351e63e3d118a9b90204-7f0c
    You can create the date object with any date you like.
    e.g.
    var myDate:Date = new Date("Wed Aug 1 2012 10:42:00 AM");

  • Dynamic tables with data driven visibility of columns (XML).

    Hi
    I am trying to make a template in LiveCycle Designer (XDP) with a dynamic table, and with dynamic visibility of columns.
    I want the column visibility to be driven by the xml input.
    (There is no user input.)
    I want the columns to visible in the table only if one or more of the rows has a data cell with value in a spesific column. If not the entire column should dissappear from the generated pdf.
    If that is not possible, my alternative is so set a value in th XML file to hide a tables column. But how?
    I have no problems of making dynamic tables, that is solved.
    I only want to hide unused columns in a table, defined in the xml source file.
    Can anyone help?
    Borge

    Hi,
    The link is not working..
    Please provide a valid link.

  • DataGrid with data paging

    Hi,
    I have seen many examples of data paging using a Flex DataGrid: http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/
    This essentially means that as the user scrolls the DataGrid only the data needed  is requested and displayed (essential for m app as users could have 1000's of records). I was wondering if anyone has any examples of doing this with a Flash DataGrid rather than Flex as my project is pure AS3.
    Regards,
    Scott

    hI,
    I've been through these excellent tutorials but none of them seem to load the data on demand, they just load the data all at once rather than when the user scrolls.
    Thanks

  • Is it possible to output a report as a text file (.txt) in a Data Driven Subscription?

    Is it possible to create a Data Driven Subscription report as a text file output to a shared folder? Thanks.
    Kahlua

    Hi Vicky:
    Thank you for your reply. I changed the config file in SSRS and it works. I managed to generate a text file with Data Driven Subscription as the report output in a shared folder. However is it possible not to have the "double quote" wrapping around
    the text. Do I need to modify the config file to remove the "double quote" and how. Thanks. 
    Kahlua
    <Render>
    <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/>
    <Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="False"/>
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>
    <Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="TAB" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
    <OverrideNames>
    <Name Language="en-US">TAB (Tab Delimited Text File)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <FieldDelimiter xml:space="preserve">[TAB]</FieldDelimiter>
    <UseFormattedValues>True</UseFormattedValues>
    <NoHeader>True</NoHeader>
    <FileExtension>txt</FileExtension>
    <Qualifier xml:space="preserve"></Qualifier>
    <ExcelMode>False</ExcelMode>
    </DeviceInfo>
    </Configuration>
    </Extension>
    <Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="False" LogAllExecutionRequests="False"/>
    <Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="False" LogAllExecutionRequests="False"/>
    <Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering"/>
    <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/>
    <Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" LogAllExecutionRequests="false"/>
    <Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering"/>
    </Render>

  • Data Driven EMail Subscription in SQL Server Reporting Services...

    Hi,
       I have a clarification in SQL Server Reporting Services Data Driven Subscription. We have a request to send an email a report based on the report parameter Site . The request is to send email For each site the report is running, email should sent to different recipients list. We have 97 different sites in the Site parameter.
       If Report is running for Site C004 the email should be sent to one recipient, if the Report is running for Site C007 , then the email should be sent to another recipient. Here we have been requested to do with Data-Driven Subscription. How to send the report as a email for each site for different Recipients using Data Driven EMail Subscription.
    Please give us a suggestion to overcome this problem.
    Thanking You...

    Hi David,
    Thanks for your comments. We understand the Data Driven subscription, but we dont know how to write query for this subscription. here is our scenario.
    There are list of sites in the table. like C004, C007, C008 etc..... in the report,
    We have Site parameter (All Sites (default), C004, C007 etc....) and also date range parameter (Start Date, End date) (which are not defaulted in the report) and other 2 parameters. Here we need to send the report to different recipients based on the site. C004 report results should be develivered to one recipient, C007 site results should be delivered to another recipient and so on....
    As we are new to Data driven subscription, can you explain how to create table that will be saving the email recipients list and the query that we are specifying in the Data Driven Subscription. Please help us to how to create the data driven subscription for the above scenarion. 
    Thanks and Regards,
    Sundarrajan.G

  • How to populate DataGird with data returned from php page?

    Hi, I'm new in Flex, I try to populate DataGrid with data from PHP, My code is
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false" method="POST" showBusyCursor="true" resultFormat="e4x">
    </ mx:HTTPService>
    <mx:DataGrid 
    id="searchResult" dataProvider="{???what to paste here???}" y="30">
    </mx:DataGrid>
    private  
    function getPerson(evt:ResultEvent):void { var res:XMLList = evt.result..dane as XMLList;searchResults =
    new XMLListCollection(res); 
    output from PHP
    <person>
    <dane>
    <name>ABC</name>
    <street>XLXXLX</street>
    </dane>
    <dane>
    <name>DEF</name>
    <street>YAYAYAY</street>
    </dane>
    </person>
    If I set the dataProvider as "searchResults" it doesn't work. I probably have to set as dataprovider any ArrayCollection , but I don't know how to convert my XMLListCollection to it.
    Could anyone help me populate Datagrid with
    name | streer
    ABC, XLXXLX
    DEF, YAYAYAY
    Best Regards,
    Mariusz

    Thanks for your reply, but I'm afraid it doesn't work :-( Could you browse my code and check what I'm doing wrong???
    full mxml code:
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="personRequest.send()">
    <mx:Script><![CDATA[
         import mx.rpc.events.ResultEvent; 
         [Bindable]
         public var searchResultsXML:XML;  
         private  function getPerson(evt:ResultEvent):void 
          {          searchResultsXML = (evt.result
    as XML);
              trace(searchResultsXML);     }
    ]]></mx:Script>  
    <mx:HTTPService 
    id="personRequest" result="getPerson(event)" url=http://localhost/searchPerson.php useProxy="false"
    method="POST" showBusyCursor="true" resultFormat="e4x"></mx:HTTPService>
    <mx:DataGrid  id="searchResult" dataProvider="{searchResultsXML.dane}"></mx:DataGrid>
     </mx:Application> 
    trace statement returns:
    <person>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Nowogródzka</ulica>
    <dom>7B</dom>
    <lokal>25</lokal>
    </dane>
    <dane>
    <id>1</id>
    <nazwisko>Topczewski</nazwisko>
    <imie>Mariusz</imie>
    <imie2/>
    <miejscowosc>Bia?ystok</miejscowosc>
    <ulica>Sybiraków</ulica>
    <dom>15</dom>
    <lokal>27</lokal>
    </dane>
    </person>

  • DataGrid with dynamic comboboxes

    I need to design a dataGrid with comboboxes in one column. These comboboxes should all have different dataProviders based on a value from column 1. What would a general approach be?
    Thanks

    The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Silverlight DataGrid with Combobox rendering problem

    As you know that we have already implemented Silverlight application in our application, we need your help to resolve one issue that currently we are facing, actually this is a production bug. We are using Silverligh3 latest version. In our Silverlight
    page we have one data grid and inside that we have one dropdown list as a column and others are textboxes. The dropdown lists are attached with the data context using two way binding. Now in order to simulate the issue, add multiple rows (using front-end ‘Add
    Row’ custom button) on that data grid at runtime so that scrollbar is coming on the data grid, select data from combo boxes from first two rows, and after scrolling up and  down for 2-3times causing combo boxes data disappeared from selected ones and it is
    appearing on rows where no values are selected earlier. But if you reload the page then everything is coming as before. And we have checked that the data context object is purely ok and this is a layout refreshing problem only. I do not know whether this is
    a bug of Silverlight or not, but as this is a production issue, I need your help urgently.

    Thanks for your reply. I have simulated the problem in a test page which I have uploaded in this forum. As per your suggestion I have added the code but I doubt whether I have
    done it properly. Please check the code as after incorporating the StackPanel also it behaves the same way. You will find the source code for Page1.xaml and the Page1.xaml.vb below in this page. Please review and let me know why virtualization is still active. 
    Page1.xaml
    <navigation:Page x:Class="SLClientApp.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    mc:Ignorable="d"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    d:DesignWidth="640" d:DesignHeight="480"
    Title="Page1 Page">
    <Grid x:Name="LayoutRoot">
    <data:DataGrid Margin="18,0,18,18" VirtualizingStackPanel.VirtualizationMode="Standard" x:Name="dtgTestGrid" ItemsSource="{Binding Mode=TwoWay, Path=TestDataCol}" AutoGenerateColumns="False" >
    <data:DataGrid.Columns>
    <data:DataGridTemplateColumn Header="Test Combo">
    <data:DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <ComboBox VirtualizingStackPanel.VirtualizationMode="Standard" Loaded="SetDataForCombo" x:Name="cmbTestCombo" Height="24" Width="120" >
    <ComboBox.ItemsPanel>
    <ItemsPanelTemplate>
    <StackPanel/>
    </ItemsPanelTemplate>
    </ComboBox.ItemsPanel>
    </ComboBox>
    </DataTemplate>
    </data:DataGridTemplateColumn.CellTemplate>
    </data:DataGridTemplateColumn>
    </data:DataGrid.Columns>
    </data:DataGrid>
    </Grid>
    </navigation:Page>
    Page1.xaml.vb
    Imports System.Collections.ObjectModel
    Partial Public Class Page1
    Inherits Page
    Public objTestClassCol As New TestClassCol
    Public Sub New()
    InitializeComponent()
    End Sub
    'Executes when the user navigates to this page.
    Protected Overrides Sub OnNavigatedTo(ByVal e As System.Windows.Navigation.NavigationEventArgs)
    End Sub
    Private Sub SetDataForCombo(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
    For iCount = 1 To 5
    CType(sender, System.Windows.Controls.ComboBox).Items.Add("Value" + CStr(iCount))
    Next iCount
    End Sub
    Private Sub Page1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    LayoutRoot.DataContext = objTestClassCol
    For iCount = 1 To 30
    objTestClassCol.TestDataCol.Add(New TestClass)
    Next
    End Sub
    End Class
    Public Class TestClass
    Private strLVTestData As String
    Public Property TestData() As String
    Get
    Return strLVTestData
    End Get
    Set(ByVal value As String)
    strLVTestData = value
    End Set
    End Property
    End Class
    Public Class TestClassCol
    Private objLVTestData As New ObservableCollection(Of TestClass)
    Public Property TestDataCol() As ObservableCollection(Of TestClass)
    Get
    Return objLVTestData
    End Get
    Set(ByVal value As ObservableCollection(Of TestClass))
    objLVTestData = value
    End Set
    End Property
    End Class

  • Database driven combobox itemrenderer in DataGrid

    Hi
    I created a database driven combobox itemrenderer, code see below:
    The data is loaded and shown correctly, but when I change the combobox, suddenly a "0" appears:
    I can see in the debugger in combobox1_changeHandler, that the correct data is taken from the combo "this.selectedItem.data=3;" and written to "data.professionGroup", (changed from "1" to "3")
    but then when the code jumps to set data the "value.professionGroup" is "0"?!?!
    Thank yor for any pointers!
    The DataGrid:
        <mx:DataGrid id="personDg" dataProvider="{sm.persons}" width="100%" height="100%" editable="true">
             <mx:columns>
                <mx:DataGridColumn headerText="firstName" dataField="firstName"/>
                 <mx:DataGridColumn headerText="lastName" dataField="lastName"/>
                 <mx:DataGridColumn headerText="professionGroup" dataField="professionGroup" editable="true" editorDataField="data"
                     rendererIsEditor="true"
                     itemRenderer="com.xxx.view.components.combobox.ProfessionGroupCombo">
                 </mx:DataGridColumn>
            </mx:columns>
         </mx:DataGrid>
    The ItemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ComboBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
         change="combobox1_changeHandler(event)"  initialize="combobox1_initializeHandler(event)" >
             <fx:Script>
                 <![CDATA[
                     import mx.controls.dataGridClasses.DataGridListData;
                     import com.myfim.model.ShellModell;
                       import mx.events.ListEvent;
                        import mx.events.FlexEvent;
                     [Bindable]
                     private static var sm:ShellModell=ShellModell.getInstance();
                        public function setSelectedItemByValue(val:int):void{                                                                   
                             this.selectedIndex = -1; // Show prompt if value is not found
                             for (var i:int=0;i<this.dataProvider.length;i++){
                                if(this.dataProvider[i].data == val){
                                     this.selectedIndex = i;
                                     break;
                             }// for
                     override public function set data(value:Object):void{
                        super.data=value; // value is the VO!
                         setSelectedItemByValue(value.professionGroup);
                     protected function combobox1_changeHandler(event:ListEvent):void
                        data.professionGroup=this.selectedItem.data;                   
                        // I can see in the debugger that "data.professionGroup" gets the correct data f.e. ="3" , but if it jumps to the "set data" the                          value.professionGroup is "0" !??     
                    protected function combobox1_initializeHandler(event:FlexEvent):void
                        this.dataProvider=sm.comboData.professionGroupAc;  // AC of (label, data)
                 ]]>
             </fx:Script>
    </mx:ComboBox>

    Hi,
    yupiiee! I found the answer by myself, I had to change
    editorDataField="data" to editorDataField="value"
    Thats all! Then it works!
    Martin Zach

  • Combobox in Datagrid with different values

    Hi All,
    I have a datagrid. One of the columns in the datagrid is set
    to display a combobox as the ItemRenderer. Now, the data for the
    combobox is different for each row. How do I set up the data
    provider for the combobox in such a scenario.
    For example : I have a collection of Shirt objects.
    public class Shirt {
    public String id;
    public String type;
    public String[] color; //this is an array
    This should be displayed in the datagrid, with the Color
    column rendered as a combobox. The colors will be different for
    each shirt.
    Thanks
    CS

    Yes. Some more detail:
    in the function,
    override public function set data(value:Object): void {
    the "value" parameter will contain a refernce to an entire
    "Shirt" instance.
    So you can assign the comboBox.dataProvider=value.color;
    Now, It is more complicated than this, because you will want
    the combobox to show the correct value for each row, right?
    For this to happen, you will need a selectedColor property on
    Shirt. When the user chooses a color, you will need to update this
    property with the selection.
    Next, your renderer must read the value of selectedColor and
    set the comboBox.selectedIndex.
    If selectedColor contains the *index* of the color then you
    have it easy. If it contains the color name itself, then you will
    have to for-loop over the color array until yom match the
    selectedColor. then you will have the index and can set
    selectedIndex.
    ComboBox does not support setting the value directly. It is
    pretty easy to extend combo to do this. There are several examples
    out there. I posted a link to one on CFLEX.net
    Tracy

  • Datagrid itemrenderer list rowcount not changing with data

    I have a datagrid with an itemrenderer.  the itemrenderer is a list component.  I populate the list with different values for each datagrid row.  this works fine.  However, I want the list to reset the rowcount for each datagrid row.  This is not happening.  if the first datagrid row list box is 3 rows every list box in that column is 3 rows no matter what i do.  here's my code:
    <mx:List xmlns:mx="http://www.adobe.com/2006/mxml" rowCount="1">
    <mx:Script>
      <![CDATA[
       import mx.utils.ObjectProxy;
       import mx.collections.ArrayCollection;
       import mx.utils.ArrayUtil;
       [Bindable] private var arr:Array;
       override public function set data( value:Object ) : void
        super.data = value;
        if(value != null && value.MEET is ArrayCollection)
         var len:Number = value.MEET.length;
         arr = new Array();
         for each (var obj:ObjectProxy in value.MEET){
          arr.push(obj.DAYS);
         this.dataProvider = arr;
         //labelField = "DAYS";
         this.rowCount = len;
        else if (value != null && value.MEET is ObjectProxy )
         this.rowCount = 1;
         this.dataProvider = value.MEET;
         this.labelField = "DAYS";
        else
         this.rowCount = 1;
      ]]>
    </mx:Script>
    </mx:List>

    Hello !
    This trick makes my application freeze...
    I've just an advancedDatagrid populated with arrays, and a list as renderer on some of its columns... I've got exactly the same problem (rowCount that is always the same, for all of my renderers instances), but your solution doesn't work it out...
    Any idea ?
    thanks a lot

  • How to display data in ComboBox when click on DataGrid Row.

    Hi!
         I am new to Adobe Flex. I am building one Project that was related to Comapny and Customer. First I created Company Master. Then I create Customer Master successfully and My Backkend is SQLite Database.
         My Problem is I have two files one is CustomerMaster and second one is CustomerForm.
         In CustomerMaster I have a datagrid in that data was displaying thru Array Collection. When ever we doublick on datagrid row it's displayed a CompanyForm. CompanyForm  contains TextFiled and ComboBox. TextFiled populating data but Combobox doesnot. It display always prompt message.
          Please help.
    Thanks,
    Sree Kumar

    Hi! Vibhuti Gosavi,
                          First of all thanks for your quick reply. Already I saw that link.
    Actually, In CustomerForm successfully store the information into the database. While retrieving the data problem cames. Sample Code:
    CustomerMaster:
    private function createItem():void
                                            openTab(new Object());
                                  public function openTab(customer:Object):void
                                            var children:Array = tn.getChildren();
                                            var length:int = children.length;
                                            for (var i:int = 0; i<length; i++)
                                                      if (children[i].customer.customerId == customer.customerId)
                                                                tn.selectedIndex = i;
                                                                return;
                                            var form:CustomerForm = new CustomerForm();
                                            tn.addChild(form);
                                            form.customer = customer;
                                            form.dao = dao;
                                            form.addEventListener(CustomerEvent.CREATE, customerChangeHandler),
                                                      form.addEventListener(CustomerEvent.UPDATE, customerChangeHandler),
                                                      form.addEventListener(CustomerEvent.DELETE, customerChangeHandler),
                                                      tn.selectedChild = form;
                                  private function customerChangeHandler(event:CustomerEvent):void
                                            customerArrayList = dao.findByCustomerAll();
                                            if (event.type == CustomerEvent.DELETE)
                                                      tn.removeChild(event.target as CustomerForm);
                        ]]>
              </fx:Script>
              <mx:Canvas id="container" left="12" right="12" top="12" bottom="12">
                        <mx:Canvas left="0" top="2" right="0" height="33">
                                  <mx:Button id="AddCustomer" x="1" width="108" height="32" click="createItem()"
                                                         icon="@Embed('assets/icon_plus.png')" label="Add Customer" toolTip="Add Customer"
                                                         verticalCenter="-1"/>
                        </mx:Canvas>
                        <code:SuperTabNavigator id="tn" x="0" y="39" width="681" height="197"/>
                        <mx:DataGrid id="customerList" x="1" y="262" width="680" height="231"
                                                       dataProvider="{customerArrayList}"
                                                       doubleClick="openTab(customerList.selectedItem)" doubleClickEnabled="true">
                                  <mx:columns>
                                            <mx:DataGridColumn dataField="customerId" headerText="Id"/>
                                            <mx:DataGridColumn dataField="customerName" headerText="Name" />
                                            <mx:DataGridColumn dataField="companyName" headerText="companyName" />
                                  </mx:columns>
                        </mx:DataGrid>
              </mx:Canvas>
    CustomerForm:
    public function set customer(customer:Object):void
                                            this._customer = customer;
                                  public function get customer():Object
                                            return this._customer;
                                  private function saveCustomer():void
                                            if (Validator.validateAll(customerValidators).length>0)
                                                      return;
                                            _customer.customerName = customerName.text;
                                             _customer.companyName = companyName.text;
                                            if (_customer.customerId > 0)
                                                      updateCustomer();
                                            else
                                                      insertCustomer();
                                  private function insertCustomer():void
                                            try
                                                      Alert.show(_customer.normalPkts);
                                                      dao.insertCustomer(_customer);
                                                      customerId.text = _customer.customerId;
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.CREATE, _customer, true));
                                                      var alertText:String="Company Created Successfully!";
                                                      Alert.show(alertText,"",4,null,null,ConfirmMessage);
                                            catch (error:SQLError)
                                                      var alertErrorCreate:String="Company not Created...";
                                                      Alert.show(alertErrorCreate+"\n"+error.details,"",4,null,null,ErrorMessage);
                                  private function updateCustomer():void
                                            try
                                                      dao.updateCustomer(_customer);
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.UPDATE, _customer, true));
                                                      var alertText:String="Company Updated Successfully!";
                                                      Alert.show(alertText,"",4,null,null,ConfirmMessage);
                                            catch (error:SQLError)
                                                      var alertErrorText:String="Company not Updated...";
                                                      Alert.show(alertErrorText+"\n"+error.details,"",4,null,null,ErrorMessage);
                                  private function deleteItem():void
                                            try
                                                      dao.deleteCustomer(_customer);
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.DELETE, _customer, true));
                                            catch (error:SQLError)
                                                      Alert.show(error.details, "Error");
                        ]]>
              </mx:Script>
       <mx:Grid x="10" y="10" width="665" height="130" verticalAlign="middle">
                        <mx:GridRow width="665" height="100%">
                                  <mx:GridItem width="85" height="100%">
                                            <mx:Label width="85" text="Customer Id:"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="115" height="100%">
                                            <mx:TextInput id="customerId" text="{_customer.customerId}" editable="false" width="115"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="102" height="100%">
                                            <mx:Label width="102" text="Company Name:"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="100" height="100%">
                                            <mx:ComboBox id="companyName" dataProvider="{companyIdList}" labelField="companyName"
                                                                           prompt="Select..." text="{_customer.companyName}" width="100"/>
                                  </mx:GridItem>
                          <mx:GridItem width="230" height="100%" horizontalAlign="center" verticalAlign="middle">
                                            <mx:Button label="Save" click="saveCustomer()"/>
                                            <mx:Button label="Delete" click="deleteItem()"/>
                                  </mx:GridItem>
                        </mx:GridRow>
              </mx:Grid>
    =====================================================================
    I have two ArrayCollections 1) companyIdList (CustomerForm)
                                              2) customerArrayList(CustomerMaster)
    please go through the bold text. Please focus on two dataProviders. These dataproviders are binding for One Combo Field.
    Thanks,
    Sree Kumar
    Message was edited by: sreekumar1976

Maybe you are looking for