473,715 Members | 6,043 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data retrival time and combo load

kk
Have 2 problems, any help is appreciated.

Tab with Grids
--------------
BL - fetching data from DB ( 5 secs - 10 rows)
Grid Laod - 20 secs
Grid Paint on tab change - 20 secs

Problem: The data fetch only takes 5 secs, why does paint
and load take 40 secs in total.
Is there any reason why it is very slow.
Combo loads
-----------
Combo loaded with data binding using a collection of
business layer objects, how can we add a string
named 'ALL' to the combo box without creating an empty
object and adding it to the array collection.

Thanks,

Jul 21 '05 #1
2 2042

first issue... don't know. send code sample.
2nd issue - after binding add a new item.
mycbobox.Items. Insert(intPosTo InsertAt,"ALL")

Nick Harris, MCSD
http://www.VizSoft.net

"kk" <an*******@disc ussions.microso ft.com> wrote in message
news:03******** *************** *****@phx.gbl.. .
Have 2 problems, any help is appreciated.

Tab with Grids
--------------
BL - fetching data from DB ( 5 secs - 10 rows)
Grid Laod - 20 secs
Grid Paint on tab change - 20 secs

Problem: The data fetch only takes 5 secs, why does paint
and load take 40 secs in total.
Is there any reason why it is very slow.
Combo loads
-----------
Combo loaded with data binding using a collection of
business layer objects, how can we add a string
named 'ALL' to the combo box without creating an empty
object and adding it to the array collection.

Thanks,

Jul 21 '05 #2
kk
Thank you for the prompt reply.

1st issue :
--------------------------------------------------------
Loading Grid
------------
1) creating new rows in a datatable and adding data a
array list to datatable.

ArrayList arrData = new ArrayList();
arrData = Employee.GetAll ();

DataTable dt = new DataTable();
DataRow dr = new DataRow();
for(i=0; i< arrData.Count; i++)
{
dr = dt.NewRow();
dr["Age"] = ((Employee)arrD ata[i]).Age;
dr["Name"] = ((Employee)arrD ata[i]).Name;
dr["Object"] = arrData[i];
}

2) From datatable populating the grid
Total time taken for this is 40 secs.
Grid.DataSource = dt;

Clicking on tabs at runtime with grids in each tab
--------------------------------------------------
3) Even though the grid is loaded with data, it takes
full 20 secs for the grid to show on each tab when
switching between tabs at runtime. Grid painting is
time consuming.

2nd issue:
----------------------------------------------------------
Tried the InsertAt after the data binding and it did not
work, complained that positions for items cannot be
changed. Also tried inserting before the binding,
although there were no runtime errors, the "All" entry was
overwritten by the databinding.

public static void LoadCombo(Syste m.Windows.Forms .ComboBox
cbo, ICollection data, string display, string key)
{
ArrayList arData = (ArrayList) data;
if (arData.Count == 0)
{
cbo.DataSource = null;
}
else
{
cbo.DataSource = arData;
cbo.DisplayMemb er = display;
cbo.ValueMember = key;
cbo.Items.inser t(0,"All"); -- Did not work
}
-----Original Message-----

first issue... don't know. send code sample.
2nd issue - after binding add a new item.
mycbobox.Items .Insert(intPosT oInsertAt,"ALL" )

Nick Harris, MCSD
http://www.VizSoft.net

"kk" <an*******@disc ussions.microso ft.com> wrote in messagenews:03******* *************** ******@phx.gbl. ..
Have 2 problems, any help is appreciated.

Tab with Grids
--------------
BL - fetching data from DB ( 5 secs - 10 rows)
Grid Laod - 20 secs
Grid Paint on tab change - 20 secs

Problem: The data fetch only takes 5 secs, why does paint and load take 40 secs in total.
Is there any reason why it is very slow.
Combo loads
-----------
Combo loaded with data binding using a collection of
business layer objects, how can we add a string
named 'ALL' to the combo box without creating an empty
object and adding it to the array collection.

Thanks,

.

Jul 21 '05 #3

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

Similar topics

5
2362
by: Frazer | last post by:
hi i have a combo box which i populate with all tables from northwind database and when the user selects an item from the combo, i want to populate the datagrid with data from that table. private void FillComboBox() { DataSet allTablesDataSet = new DataSet("AllTables");
2
6952
by: Jeremy Dillinger | last post by:
I have a program setup to pull data from a database. My database table has things such as (category, Item, price, etc.) In my program I want to have multiple list boxes that will have a pull down list of different categories. The category is stored as a number and the item is stored as a string. Also once the item is picked from the list I would also like to extract the price corresponding to the chosen item. This program will be to...
2
315
by: kk | last post by:
Have 2 problems, any help is appreciated. Tab with Grids -------------- BL - fetching data from DB ( 5 secs - 10 rows) Grid Laod - 20 secs Grid Paint on tab change - 20 secs Problem: The data fetch only takes 5 secs, why does paint and load take 40 secs in total.
3
1537
by: Chris H | last post by:
Ok in the following code I am trying to have my keywards meta tag auto insert the top 10 titles from most recently added database entries, right now the while loop is only setting the $keyword varibale with one title and not the top 10.. not sure what i am doing wrong... Note: keyword retrival code will be between ######## //comment CODE #######
3
8239
by: rlm | last post by:
This small problem to solve involves a two table database (one parent and one child table), one winform and two combo boxes. Combo box A is populated in the Load event. Combo box A pulls data from the parent table. A second combo box (box B) will be populated (from the child table) based on data selected in by the user in combo box A. In the datastore the child contains a numeric foreign key from the parent.
0
4166
by: Gian Paolo | last post by:
this is something really i can't find a reason. I have a form with a tabcontrol with tree pages, in the second page there is a Data GRid View. Plus i have a class. When i open the form i "inizialize" the Data Grid View (add a data sorce, filled with notthing at staratup, and hide some columns) when i put a code in the txtCLCOD textbox start a searsh. If i foud something i popolate the Data grid view on the second page. Now the magic if i...
2
2746
by: WB | last post by:
I have an app that will need to store hostorical data (path & filenames) in a combo box (so that the user doesn't have to type in the same data each time the app is restarted). Is it best to keep this data in the registry, or in app.config? I've already asked about using app.config in this context, in a different question in this forum. However if the registry is the preferred method, how should this list of data be stored & retrieved...
3
2441
by: Max | last post by:
Hello, I made a windows form with a combo box and 4 text boxes. All 5 objects should get their data from a data set which is populated in the form load method. The combo box has item ids. When the users selects an item from the combo box I'd like the 4 text boxes to get populated with the corresponding item information from the same dataset table row that the combo box is pulling it's info from. Is there an easy way of doing this besides...
10
5842
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi, Problem: How can I databind (or put) a SqlServer query's row return of 115,000 items into a ComboBox quickly? Not much longer than a matter of seconds, that is... Scenario: I am rebuilding my company's Access 97 VBA database app. It pulls 115,000 items (of account names) from SqlServer and the data is bound to a single Access 97 ComboBox control. My C# version needs to work exactly like this one. Our executive employees want...
0
8718
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9340
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9196
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
9103
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
9047
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...
0
7973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4738
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2539
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2118
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.