473,406 Members | 2,217 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,406 software developers and data experts.

Is there any way to append some items to List box, without retrieving all items through AJAX?

Suppose i have a multi-select list box which loads data from a table in a
SQL Server 2005 Database.

This list box loads all rows from the table, which has around 2000 rows. So
when databinding all 2000 rows will be fetched from database and bound to
the List box. Which is fairly a time consuming process.

Now when i insert 5 more values into the database and call list box's
DataBind() method, it will return all 2005 rows. So, continuing this process
it will take more and more time to load and manipulate data through the list
box, As daily i would have to add 10-15 rows of data to the table.

My question is, Can i add the newly added rows to the existing items of the
list box by any means using AJAX? That means if i add 1 row to the table, i
want to fetch that single row and then add it to the list box's existing
items. This can improve the performance of the system very much.

But the question is "IS IT POSSIBLE?"

Feb 14 '08 #1
1 1457
you could change your SELECT query to fetch records with ID greater than the
last item in the listbox and iterate over the DataTable returned adding each
item to the listbox.items collection

--
Misbah Arefin

"Anjan Bhowmik" wrote:
Suppose i have a multi-select list box which loads data from a table in a
SQL Server 2005 Database.

This list box loads all rows from the table, which has around 2000 rows. So
when databinding all 2000 rows will be fetched from database and bound to
the List box. Which is fairly a time consuming process.

Now when i insert 5 more values into the database and call list box's
DataBind() method, it will return all 2005 rows. So, continuing this process
it will take more and more time to load and manipulate data through the list
box, As daily i would have to add 10-15 rows of data to the table.

My question is, Can i add the newly added rows to the existing items of the
list box by any means using AJAX? That means if i add 1 row to the table, i
want to fetch that single row and then add it to the list box's existing
items. This can improve the performance of the system very much.

But the question is "IS IT POSSIBLE?"
Feb 14 '08 #2

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

Similar topics

19
by: John Keeling | last post by:
Dear all, I tried the test program below. My interest is to examine timing differences between insert vs. append & reverse for a list. My results on my XP Python 2.3.4 are as follows:...
6
by: M. Clift | last post by:
Hi All, I have tried to come up with a way to do this myself and all I end up with is very long code. What I have is a say item1, item4, item2, item1 etc... What I want to do is append to...
25
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
3
by: Peter | last post by:
I have 20000 Items (LastName, FirstName) I need to display in a DropDown box, but it takes a while to load them after every postback. What would be the best way to allow user to view these 20000...
2
by: jeremito | last post by:
I have created a class that inherits from the list object. I want to override the append function to allow my class to append several copies at the same time with one function call. I want to do...
1
nmm32
by: nmm32 | last post by:
I am trying to use Ajax with JSP to populate a 2nd drop down list based on the chosen option of the first one. I am getting the error "Object Expected" on the line 13-14 of the HTML: <script...
2
by: ravisuguna | last post by:
Hi, I have a php page which has some checkboxes ,textfields and values.If I select a checkbox ,a particular value will be displayed in a textfield.I have a "go"button in the same page.I want the...
3
by: =?Utf-8?B?YW1pcg==?= | last post by:
Hi, I have a Generic Object that has a private List field item. I populate the List in a different function I use a FOREACH LOOP with a FindAll function to get all items that have a certain...
5
by: amandab116 | last post by:
I'm having a hard time figuring out how to move items between a left and right listbox server-side. I have a populated listbox from the database on the left and I'm trying to add items to the box...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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,...
0
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...

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.