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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anjan Bhowmik

    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?"

  • =?Utf-8?B?TWlzYmFoIEFyZWZpbg==?=

    #2
    RE: Is there any way to append some items to List box, without retriev

    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?"
    >

    Comment

    Working...