I have three listboxes surrounded in ajax update panels that are populated by data I grab from a webrequest to a remote server.
On two of them, the data is returned in JSON and I parse it out by using a "For Each" to loop through the JSON add items to the listbox. The problem with my approach, I believe, is that I have to drop/clear all the items out of the listbox, and then rebind with fresh data. I do this every 3 to 5 seconds, as it is a chat-like program that needs real-time updates. Whats happening is that when moused-over, you can see items in the listbox flicker as they get rebound. I'm pretty sure it makes quite a bit of overhead, too.
My first theory in improving it would be to make the items dump into an radlistboxitemcollection and bind the listbox to that collection with "allowautomaticupdates" enabled, but I'm not even sure thats how that works.
Is there a better way to approach this? I can't really change how I pull the data much, just how I process it.
On two of them, the data is returned in JSON and I parse it out by using a "For Each" to loop through the JSON add items to the listbox. The problem with my approach, I believe, is that I have to drop/clear all the items out of the listbox, and then rebind with fresh data. I do this every 3 to 5 seconds, as it is a chat-like program that needs real-time updates. Whats happening is that when moused-over, you can see items in the listbox flicker as they get rebound. I'm pretty sure it makes quite a bit of overhead, too.
My first theory in improving it would be to make the items dump into an radlistboxitemcollection and bind the listbox to that collection with "allowautomaticupdates" enabled, but I'm not even sure thats how that works.
Is there a better way to approach this? I can't really change how I pull the data much, just how I process it.