Hi Jim, Thanks for this it worked really well.
I just wanted to ask a follow up question, have you ever had any problems with the getDataAsMapArray()? I'm finding that it only returns data that has a corresponding column even though I am setting the rememberMaps parameter to true when using setDataAsMapArray. Thanks again -- Nathan Hadley www.celcat.com Tel: 024 7646 9930 CELCAT is the trading name of Corbett Engineering Ltd, a limited company registered in England and Wales with company number 1448722. VAT number: 418696219. Registered office: 21-23 Mercia Business Village, Torwood Close, Coventry, CV4 8HX, United Kingdom -----Original Message----- From: Jim Hunter [mailto:[email protected]] Sent: 28 April 2009 18:30 To: qooxdoo Development Subject: Re: [qooxdoo-devel] adding "hidden" data to a table model Instead of using a basic array to feed data to your table, use a JSON object. Doing that, you can have all sorts of data in the object, but only display the information that you ask for in the column headings array you use to create the table model. Your JSON data might look like: [{"rowID":1, "col1":"some data","col2":"more data"},{"rowID":2,"col1":"my data","col2":"and more data"}] and your column heading array might then look like: ["col1","col2"] // notice that we aren't using the rowID in the table, yet the data for it is still there. When you create your table column model, make sure that you assign the headings first then assign the data using setDataAsMapArray. If you don't set the columns first your data won't be able to bind to any columns and you will get a grid with column heading but no data, don't ask how I discovered that piece of information. Tables work very well using JSON, it has allowed us to carry all sorts of additional information along with the visible data. Good luck, Jim On Tue, Apr 28, 2009 at 8:26 AM, Nathan Hadley <[email protected]> wrote: > Hello all, > > > > I am using a table widget with a Simple model to display a list of records > in a database. My question is, is it possible to attach other data (e.g. a > unique id) to each row without having a column for it and then hiding it? > > > > I need to be able to reference the unique id when calling server-side > functions but don't want it shown to the user and I am concerned that having > lots of hidden columns would give an unnecessary performance hit. > > > > I have searched the forum but haven't found anything about this issue. > > > > TIA > > > > -- > Nathan Hadley > www.celcat.com > Tel: 024 7646 9930 > > CELCAT is the trading name of Corbett Engineering Ltd, > a limited company registered in England and Wales with > company number 1448722. VAT number: 418696219. > Registered office: 21-23 Mercia Business Village, > Torwood Close, Coventry, CV4 8HX, United Kingdom > > > > ------------------------------------------------------------------------ ------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------ ------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
