PDA

View Full Version : Extjs dataview issue



prajeesh_bs
28 Apr 2011, 4:02 AM
I am creating a report making tool. I will be dragging/resizing panels inside a panel container. When i click save button, i am passing the size and position of panels and based on that an xhtml report will be generated. I have a dataview on the left side. Each time a report is generated i need to show that report on dataview. Without using any database how this can be done? Any help would be appreciated.

fay
28 Apr 2011, 4:08 AM
Are you asking for someone to show you how to do all of the above, or do you just want to know how to use a DataView without it being server-side data-driven? If the latter, see the example at the beginning of the ArrayStore (http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.data.ArrayStore) docs.

prajeesh_bs
28 Apr 2011, 4:47 AM
hi fay,
The reports are created dynamically.it would have been much easier if i use a db.when i save report i could save the properties into database and load into dataview from db.
i dont know how to show the dynamically created report in the dataview without using any database. Any idea?

fay
28 Apr 2011, 4:51 AM
Did you look at ArrayStore (http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.data.ArrayStore)?? It's basically an in-memory database.

prajeesh_bs
28 Apr 2011, 4:58 AM
suppose i am using array store for the dataview and i have data like

var myData = [
['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
];
what i need is when i save the report the output should be like

var myData = [

['newreport',71.72,0.02,0.03,'9/1 12:00am'], -----> new row added when report is saved
['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
];