Link to home
Start Free TrialLog in
Avatar of Justice75
Justice75

asked on

Populating DataGrid with 1,000 Records

Hi All,

I have a quick question.  Using the example from Member Negatyve (http://www.negatyve.com/EE/dg2004aspDB.zip) what if the table held 1,000 or more records.  How could you count al lof the records and load let's say 100 at a time into Flash and/or load into the databgrid?  Is this possible and does anyone have an example?  Any help would be greatly appreciated.

Thanks,

Justice

Avatar of nishasrilankan
nishasrilankan
Flag of Sri Lanka image

Flash Datagrid is not supported with lot of data..when you have abt 1000 records its performance is greately reduced. and As I know..flash Datagrid doesnt support paging so you have to create the xml with paged wiev. to do this you have to edit the ASP file which generates the XML file( dg2004aspDB_xmlConn.asp). You can filetr your data in the ASP file. or you can page your data with ASP file or..you can select your TOP "n"  number of data form the ASP file. And dont forget to preload your XML file.  
>>Flash Datagrid is not supported with lot of data

this should me ammended as "Flash Datagrid is not enhancedto handle lot of data"
Avatar of Justice75
Justice75

ASKER

Hi and thanks for addressing my question.

1)  Can you show me an example of paged view with the dg2004aspDB_xmlConn.asp file?
2)  What do you mean when yu say "TOP n number" from the ASP file, can you show me an example?
3)  How do I preload a XML file and how long does it take to load?

I know this may be a pain however I would greatly benefit from you showing me examples with the example. Examples help because I am new and unless I see it, I am lost.  So if you have time can you please help?

Thanks,
Justice
nishasrilankan,

Also can you tell me how with the example file do I change the name of the columns? I tried to use the code:

data_dg.getColumnAt (0).headerText = "ID";
data_dg.getColumnAt (1).headerText = "User Name";
data_dg.getColumnAt (2).headerText = "Job";
data_dg.getColumnAt (3).headerText = "Age";
data_dg.getColumnAt (4).headerText = "ICQ";

but AS ignored it and used the default name (UserName). I want to add a space to (User Name)

Thanks again,

Justice
answers for your questions...

1. I am Sorry, At the moment I am busy with the project So I dont have Time to develope a paged example...there is a component...http://www.actionscript.org/components/showComponent.php?id=1

2. In your dg2004aspDB_xmlConn.asp file...there is line with this syntax...
strSQ = "Select * from Users"

change above line to strSQ = "Select top 100 * from Users"
here n is equal to 100

3. XML Preloader Example is here...
http://www.kirupa.com/web/xml/XMLwithFlash4.htm

If you still cannot have an Idea...I think you better Learn basics about server side and XML before going into Datagrid component...coz, datagrid component is bit complicated

Thanks for your help. I am thankful foryour time.  I am catching on.  This is actually the first time that I have touched XML and I am a bit aprehensive to say the least.  However, it is making sense.  I have three quick follow up questions if you have the time.

1) RE # 2 above : I have the concept but how will I be able to get the next 100 or the last 100 records?
2) How do you sort columns with the XML file? It works with teh loadVars file but not the xml one. I tried a million things to no avail.
 3) With XML how do I change the column header names?  I tried gridName.get columnAt(0).headerText = " Column Name"
 however this will not work. Any suggestions?

Again thank you for your time and I will be sure to award your points. You definitely deserve them.  Thanks again.

Jsutice
ASKER CERTIFIED SOLUTION
Avatar of nishasrilankan
nishasrilankan
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial