Of course, automatic sorting (when clicking grid headers) would have to be decoupled from a grid logic, and it should be sent as info to a server-side procedure that fetches rows.
To sum up, it would be nice to have a grid which: 1) always displays a constant number of rows (i.e. 20), which depends of a grid height on screen - this is changed when grid is resized in vertical direction. 2) always loads a number of rows that it can display without a scroller (i.e. <20). When grid is resized to show e.g. 25 rows, its resize event is processed and grids maxNumberOfRows is set to 25. >From now on, a data is loaded in chunks of 25 rows instead. 3) clicking the headers does nothing except toggle a triangle on the column. It also propagates sort attribute and sort direction (asc/desc) to a (server-side) data fetching routine. 4) height of a scroller thumb is calculated from a number of rows that grid displays (i.e. 20) divided by total number of rows in a database table. Position of a thumb is controlled by a user moving the thumb itself or using the up/down scroller buttons. After a thumb is moved, a new startIndex is calculated and fresh data is fetched and displayed in the grid. --- In [email protected], "Danko Kozar" <[EMAIL PROTECTED]> wrote: > > I am testing both of this examples, thanks.. > > Question: is there any possibility to control the DataGrids > scrolling thumb position and height? > > Because this way a page size would be fixed (rows not scrolling at > all) and the scroller would be used just for navigation through > pages (instead of the "breadcrumbs" section above the grid). It > would also give an info of current page / total pages. > It would be nice if the scroller position and height could be set in > percentage (e.g. positionFromTop=20, height=10) while the loaded > rows count is always equal to grid rows count. > > > --- In [email protected], "roman_dolgov" <roman_dolgov@> > wrote: > > > > I am facing similar problem and wrote a blog entry on similar > topic: > > http://blog.widget-labs.com/?p=7 > > > > (The main idea is to implement custom IList data provider that > relies > > on ItemPendingError for delayed loading) > > > > regards > > rd > > > > --- In [email protected], "Danko Kozar" <danko.kozar@> > wrote: > > > > > > I'd like to hear some thoughts about paging implementation on > Flex > > > DataGrid. > > > > > > The server side implementation isn't a problem - I have a paging > > > routine that fetches chunks of data from a database. This paging > > > works ok with asp.net. > > > > > > But, with changing the client-side technology to Flex, I would > not > > > like to have a "classic web grid" with page numbers above ( 1 - > 2 - > > > 3 - ..etc ) I'd rather like to move from this web-like paging to > a > > > more Windows-like paging, e.g. have a DataGrid with a scroller > that > > > changes it's height regarding on the percent of currently > displayed > > > records. > > > > > > My idea is to: > > > 1) count a total number of records in the database table > > > 2) fill a datagrid with "blank" records (e.g. containing a > > > label "Loading...") > > > 3) regarding on the scroller position, update the dataProvider > > > item's that have to be displayed on-screen > > > > > > I assume that this method tends to be both memory and processor > > > consuming. So I'd like to hear a better idea. :-) > > > > > > ps. Does some Flex "DataGrid with paging" implementation already > > > exist? > > > > > > Thanks for answers! > > > > > >

