Click here to Skip to main content
14,303,661 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Programming in the 60s vs today... Pin
VEMS11-Dec-17 5:18
memberVEMS11-Dec-17 5:18 
GeneralRe: Programming in the 60s vs today... Pin
SeattleC++11-Dec-17 5:32
memberSeattleC++11-Dec-17 5:32 
GeneralRe: Programming in the 60s vs today... Pin
jschell11-Dec-17 5:34
memberjschell11-Dec-17 5:34 
GeneralRe: Programming in the 60s vs today... Pin
Ken Utting11-Dec-17 5:43
memberKen Utting11-Dec-17 5:43 
JokePerfecting your company's Mission Statement PinPopular
Cornelius Henning8-Dec-17 6:50
professionalCornelius Henning8-Dec-17 6:50 
PraiseRe: Perfecting your company's Mission Statement Pin
CPallini8-Dec-17 11:08
mveCPallini8-Dec-17 11:08 
GeneralArgh. Javascript ID tags Pin
Marc Clifton8-Dec-17 6:16
protectorMarc Clifton8-Dec-17 6:16 
GeneralRe: Argh. Javascript ID tags Pin
Jeremy Falcon8-Dec-17 6:30
professionalJeremy Falcon8-Dec-17 6:30 
Well, you're having fun with that library it seems. Laugh | :laugh: Sounds like you got two data sources in one tree view though? If you're not keen on redoing anything database wise, you could always populate the control with IDs like "table-id" to namespace them in essence. Not sure how that library works, but if it's populated by a JSON object then you don't even have to parse the ID. You can just tack on another property with the ID. JavaScript won't care and neither will the lib since it'll know nothing about it.

To speak in code it would be something like this...
var dataSource = [
  { id: 'table1-1', desc: 'Table 1 Foo', realId: 1 },
  { id: 'table1-2', desc: 'Table 1 Bar', realId: 2 },
  { id: 'table2-1', desc: 'Table 2 Foo', realId: 1 },
  { id: 'table2-2', desc: 'Table 2 Bar', realId: 2 },
  ...
];

Jeremy Falcon

GeneralRe: Argh. Javascript ID tags Pin
Marc Clifton8-Dec-17 7:45
protectorMarc Clifton8-Dec-17 7:45 
GeneralRe: Argh. Javascript ID tags Pin
Jeremy Falcon8-Dec-17 7:48
professionalJeremy Falcon8-Dec-17 7:48 
GeneralRe: Argh. Javascript ID tags Pin
Mycroft Holmes9-Dec-17 0:28
memberMycroft Holmes9-Dec-17 0:28 
GeneralRe: Argh. Javascript ID tags Pin
Jeremy Falcon8-Dec-17 6:55
professionalJeremy Falcon8-Dec-17 6:55 
GeneralRe: Argh. Javascript ID tags Pin
kmoorevs8-Dec-17 7:41
memberkmoorevs8-Dec-17 7:41 
GeneralRe: Argh. Javascript ID tags Pin
Marc Clifton8-Dec-17 7:47
protectorMarc Clifton8-Dec-17 7:47 
GeneralRe: Argh. Javascript ID tags Pin
Jörgen Andersson8-Dec-17 8:44
protectorJörgen Andersson8-Dec-17 8:44 
GeneralRe: Argh. Javascript ID tags Pin
Slacker0078-Dec-17 8:17
professionalSlacker0078-Dec-17 8:17 
GeneralRe: Argh. Javascript ID tags Pin
ZurdoDev8-Dec-17 8:19
professionalZurdoDev8-Dec-17 8:19 
GeneralThat Linux praise?...I take at least part of it back. Pin
dandy728-Dec-17 6:01
memberdandy728-Dec-17 6:01 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
OriginalGriff8-Dec-17 6:20
protectorOriginalGriff8-Dec-17 6:20 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
pkfox8-Dec-17 6:22
professionalpkfox8-Dec-17 6:22 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
madwilliamflint8-Dec-17 11:03
membermadwilliamflint8-Dec-17 11:03 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
Cornelius Henning8-Dec-17 6:56
professionalCornelius Henning8-Dec-17 6:56 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
Daniel Wilianto11-Dec-17 16:33
memberDaniel Wilianto11-Dec-17 16:33 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
lopatir8-Dec-17 7:44
memberlopatir8-Dec-17 7:44 
GeneralRe: That Linux praise?...I take at least part of it back. Pin
dandy728-Dec-17 11:35
memberdandy728-Dec-17 11:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.