PC Review


Reply
Thread Tools Rate Thread

datagrid - speed loading

 
 
=?Utf-8?B?QmFsYQ==?=
Guest
Posts: n/a
 
      17th Nov 2004
Hi,

Currently i am loading the file names into datagrid (unbound) from a
folder(sub folders too). so for this i am using this below code. but its too
slow to loading all the file names. is it any other method to make it fast
loading

bala

code:

Dim files() As String = Directory.GetFiles(mylocation)
Dim folders() As String = Directory.GetDirectories(mylocation)
Dim folder
Dim str() As String, intx As Integer

Try

For Each folder In folders
' lstFiles.Items.Add(folder).ToString()
Dim subFolders() As String
str = Directory.GetFiles(folder)
For intx = 0 To str.Length - 1
......


 
Reply With Quote
 
 
 
 
Robby
Guest
Posts: n/a
 
      17th Nov 2004

Fill an Array or an ArrayList then assign that to the DataGrid. You could
also use a ADO DataSet object if you want but I think that it would be
overkill since your DataGrid is unbound. One of the above will have the
effect of an empty DataGrid suddenly appearing full.

--Robby

"Bala" <(E-Mail Removed)> wrote in message
news:6288FAAB-7E75-48AC-99B2-(E-Mail Removed)...
> Hi,
>
> Currently i am loading the file names into datagrid (unbound) from a
> folder(sub folders too). so for this i am using this below code. but its
> too
> slow to loading all the file names. is it any other method to make it fast
> loading
>
> bala
>
> code:
>
> Dim files() As String = Directory.GetFiles(mylocation)
> Dim folders() As String = Directory.GetDirectories(mylocation)
> Dim folder
> Dim str() As String, intx As Integer
>
> Try
>
> For Each folder In folders
> ' lstFiles.Items.Add(folder).ToString()
> Dim subFolders() As String
> str = Directory.GetFiles(folder)
> For intx = 0 To str.Length - 1
> .....
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FE/BE loading speed Slez via AccessMonster.com Microsoft Access Forms 9 13th Feb 2007 07:36 PM
Loading speed Thomas Scheiderich Microsoft ASP .NET 1 31st Aug 2004 08:05 AM
How to speed up the loading of XP? =?Utf-8?B?TTFBMQ==?= Windows XP General 1 25th Mar 2004 06:49 AM
How to optimize datagrid loading speed Reddy Microsoft ASP .NET 3 20th Jan 2004 02:38 PM
loading speed ... Lloyd Dupont Microsoft Dot NET Compact Framework 3 13th Jan 2004 01:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:08 AM.