Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

dynamically grow a grid using javascript....

Hi,

I have a variable number of records stored in local storage and I want to use a grid with components in each row to display this data.

How in javascript can I achieve this to gain the same results as if it was a rest service propogating the grid?

the example below shows the current grids components, I merely want to address each item to fill the data and add a row as requried.

eg

--------------------------

|....IMAGE...|..label...|
|..................|..label1.|
|..................|..label2.|

--------------------------

many thanks

Andy.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

dynamically grow a grid using javascript....

thanks Katya,

I've setup the service, and no errors are reported.....however, no data maps either.

I've set the response to be an array of data

eg

gridarray array[tick]
.........shopname
.........shopowner

then, mapped the response to a grid and appropriate labels.

Then in the javascript implementation I have written a "While loop" that gets the data strings from local storage variables and return them:

eg

Have I misunderstood something?
Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

dynamically grow a grid using javascript....

Andy,

Not sure what you mean here:precodewhile (counter:shopowner});/code/pre
Probably you need this code instead:precodewhile (counter<maxcounter)/code/pre

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

dynamically grow a grid using javascript....

sorry, I've edited the post and pasted a screenshot, the code wont display on this forum.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

dynamically grow a grid using javascript....

Any ideas on this Katya?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

dynamically grow a grid using javascript....

Andy,

I'm sorry. Please check, should be displayed correctly now.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

dynamically grow a grid using javascript....

Im sorry, I think I've confused you.

I've reposted the issue with the javascript that I use, this is not working, I dont get any data in the grid...

I've setup the service, and no errors are reported.....however, no data maps either.

I've set the response to be an array of data

eg

gridarray array[tick]
.........shopname
.........shopowner

then, mapped the response to a grid and appropriate labels.

Then in the javascript implementation I have written a "While loop" that gets the data strings from local storage variables and return them:

eg

Have I misunderstood something?
Image

Return to “Issues”