473,654 Members | 3,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.GetFi les(mylocation)
Dim folders() As String = Directory.GetDi rectories(myloc ation)
Dim folder
Dim str() As String, intx As Integer

Try

For Each folder In folders
' lstFiles.Items. Add(folder).ToS tring()
Dim subFolders() As String
str = Directory.GetFi les(folder)
For intx = 0 To str.Length - 1
......
Nov 21 '05 #1
1 1806

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**@discussio ns.microsoft.co m> wrote in message
news:62******** *************** ***********@mic rosoft.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.GetFi les(mylocation)
Dim folders() As String = Directory.GetDi rectories(myloc ation)
Dim folder
Dim str() As String, intx As Integer

Try

For Each folder In folders
' lstFiles.Items. Add(folder).ToS tring()
Dim subFolders() As String
str = Directory.GetFi les(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
1699
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 results of a query (and perhaps double click on a row to open a new form). Additionally, the queries will often involve the use of 5 or more tables. Because efficiency (both speed and memory) is the primary concern what is the best method to...
5
12229
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. The ID is a member of the keys array. I then create a DataView dv over the table, and sort it by Display and ID column (in case of duplicate Display). I then set my DataGrid.DataSource = dv; I then load the datatable with my rows, and this is...
3
2819
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 there any way I can optimize the speed. Any sample code would be great. Thanks, Reddy
2
1273
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 button, I loop through each item, FindControl on each field, and save all the records displayed by the datagrid on one swoop. The problem is, it takes a looong time to draw the server control initially since all rows have to be populated with...
5
2774
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 to the database to get the next page. Is there a way to use the dataset to allow us to read back and forth in it instead of going back to the database to get it? Thanks,
4
3278
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. one datagrid is a parent and the other is a child. now when i finish encoding data from the first datagrid (which is the parent) i have to click the check box button on that grid and fill the 2nd grid w/ the data from the other table base on the...
2
1511
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 of any row other than the first one, it takes forever to go to that row, even if it's just the next one. So I limited the query to only a certain set of data which returned a little less than a thousand records and the form shows at the same...
2
2757
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 the application and database into front and back-ends, 2. Increased the load-time of my application by "pre-loading my heaviest forms when the database is initially opened, 3. When forms do open, under, "Filter Lookup" I use, "Never", 4. I set...
4
2271
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 datatable, and then figure out wich row this currently is in the Datagrid. This should probably be done using the currency manager for speed reasons. For the live of me, i can't figure out how to locate the row very fast
0
8376
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8708
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8594
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1596
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.