--- In [email protected], "Danko Kozar" <[EMAIL PROTECTED]> wrote:
>
> 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.

My example does this.

> 
> 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.

I'm sure this is possible, I'm not sure how to calculate the number of
rows that can be displayed. Probably can be derived from rowHeight on
the dataGrid.  This might get weird for heights that cannot fit a full
row at the bottom, so you may want to force the height of the grid to
certain intervals.

> 
> 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.
> 
My example does this.

> 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.
> 
This can be done, but might take some trial and error to get the logic
right.

> 

Reply via email to