473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

datagrid - speed loading

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
......
Nov 21 '05 #1
1 1790

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" <Ba**@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
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
.....

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Smith | last post by:
Hey folks, I'm writing a Windows application which has many forms which have Datagrids on them to display data. These datagrids will not be editable in anyway. They are there to just view the...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
3
by: Reddy | last post by:
The sql query for my datagrid returns 100, 000 records. But the datagrid should display 20 records per page. I am using datagrid paging, but it is taking too much time for the page to load. Is...
2
by: David C | last post by:
I designed a datagrid with editable server controls such as text boxes, dropdowns in each row. That way, the user does not have to click "Edit" to get the editable controls. And with one save...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
4
by: jaYPee | last post by:
I have already done some code to fill the datagrid. my problem is that the fill method is too slow after executing my code. here is the scenario. i have a parent/child form. all is datagrid....
2
by: Aaron Smith | last post by:
I have a DataGrid (winforms) that is bound to a table (MSDE) that has 41,000+ records in it. The form loads relatively fast and I can scroll all of the data... However, when I click in any column...
2
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split...
4
by: Ty | last post by:
Hi all Short version of my problem: i have a Datagrid (Flexgrid from ComponentOne) with a Datatable as source. I need to search a row in the datatable, using a primary key column in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.