Blog

Update on Ext JS LiveGrid component

Posted by:

Ext JS LiveGrid componentThe Ext JS LiveGrid component has received some great feedback from the community since it has been released. Though I’m permanently tweaking the extension, fixing some minor bugs and adjusting behavior, I haven’t managed to release a new version yet. However, I have set up a project homepage, where you can download an unlabeled version of the component.

7


About the Author

Thorsten is the author of the conjoon open source project and the Ext.ux.Livegrid component. In this blog he writes more or less frequently about his current projects and web development in general.

Discussion

  1. Marc Roberts  February 20, 2008

    Really appreciate the work you put in to this.

    Any chance of updating it to work with the Ext 2.0.1 release, particularly the grid bugfix ‘Fixed horizontal scroll reset issue when row selection changes’. The overridden ensureVisible function in the BufferedGridView needs updating.

    Thanks

    (reply)
  2. admin  March 19, 2008

    Fixed. New Version on the projectpage!

    (reply)
  3. lesnox  April 29, 2008

    Hello,

    have you an idea to use this grid why mssql serveur ?

    tank you to your reponse.

    lesnox

    (reply)
  4. Ken Bailes  May 27, 2008

    Hello,

    First let me say that we are very impressed with the LiveGrid component. We are running into an issue though, and I wondered if you already knew of a solution.

    For example, when selecting the first row, scrolling to the bottom of a list of say, 1000, and Shift+click selecting the bottom record and all records in between, the selection model doesn’t gather all the records. It appears to only be picking up the records that are currently loaded in the scrolling state.

    Let me know if this rings any bells for you or what other details I can provide.

    thanks

    (reply)
  5. Ken Bailes  May 27, 2008

    Update:
    I added getPendingSelections to my code but when that function gets to this.pendingSelections, it has nothing in it. (BufferedRowSelectionModel.js line 356)
    Any help is good help.

    thanks,

    ken

    (reply)
  6. Ken Bailes  May 28, 2008

    Update:
    So. bufferedStore seemed to be the key. You can get the grid position for all selections, pending or otherwise. However, with those positions there is no way to retrieve the data from the grid without going to the server. It seems as though if I am going to get ID’s for all currently selected records, I need to manage my own list of Id’s on every record select and deselect event. Am I missing something?!

    (reply)
  7. admin  May 29, 2008

    Hi Ken,

    thanks for your feedback. As you noticed already, there’s in no current implementation that allows you for having all the records in the grid’s store at once (except for setting the bufferSize to the total number of records available in your connected data storage). This is by design; there is always as many records available as supplied by the bufferSize-config property.

    So, you really have to go back to the server to retrieve the pending selections. If data in the underlying data storage does not change frequently, this shouldn’t be a problem: You’ll get the indexes of the pending record’s as assumed by the component (i.e. ranges of indexes which are not available in the store at the time they where selected). We both agree that this can be critical in an environment where data changes frequently, and indexes as retrieved by the component won’t match the real position of the data in the underlying data storage. This is why there is a version-property, which should be delivered along with the store’s data everytime a response comes in. The version-property should change whenever the data on the server has changed, telling the component that a pending selection may be dirty (see selectiondirty-event in BufferedRowSelectionModel).

    However, if you think your application can handle a large amount of data at once (this goes for the clients your application runs on), you can set the bufferSize to the total number of data that’s available in the underlying data storage. You’ll still get the benefit of quicker rendering data into the grid, but you might notice performance loss when loading all those records at once via XMLHttpRequest into your app.

    Regards

    Thorsten

    (reply)

Add a Comment