Jump to content

Scroll event in DBGrid


Guest

Recommended Posts

Message from: "zilav"

 

Hi Farshad!

 

I need your advice concerning scrolling in grid. In your fishfacts demo you

have some kind of master-detail dependency - update the fish form while

scrolling through the grid, it is done with db edits, so works very fast and

doesn't send much info to client browser. In my case I have a detail grid

and some additional info, and update them in AfterScroll event of master

DataSet. The problem is, if I scroll too fast (e.g. press and hold up/down

arrow key) ext-js can't keep up with updates, shows some error and stops

working in browser. I tried using CellClick event of grid, but is is fired

only with mouse clicks.

Then I tried using runonce UniTimer, enabling it in afterscroll event to

update detail, it works more stable, but not much. If I fast scroll up and

down several times, the timer just stops working.

I evaluated the Vaadin framework before, which is the same server-driven

events framework as unigui, but uses java instead of pascal, and GWT instead

of extpascal/extjs. They have a ValueChange event in grid, that fires only

after scroll is completed for the last selected cell where cursor stops, so

there are no issues with updates in browsers. Can you implement the same

functionality in DBGrid, or perhaps can advise a workaround? Updating

master-detail is not a problem in desktop, but web is a whole different

story.

 

p.s. And one more question - is it possible to make autosize

columns/expanded column to fit grid width without writing custom onresize

events?

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"zilav"

> Hi Farshad!

>

> I need your advice concerning scrolling in grid. In your fishfacts demo

> you have some kind of master-detail dependency - update the fish form

> while scrolling through the grid, it is done with db edits, so works very

> fast and doesn't send much info to client browser. In my case I have a

> detail grid and some additional info, and update them in AfterScroll event

> of master DataSet. The problem is, if I scroll too fast (e.g. press and

> hold up/down arrow key) ext-js can't keep up with updates, shows some

> error and stops working in browser. I tried using CellClick event of grid,

> but is is fired only with mouse clicks.

 

Hi,

 

In a master/detail setup each time a row in master dataset changes detail

table is refreshed too. This can create lots of data traffic and with fast

key input browser may lag behind the server and it will not be able to

handle input traffic.

My own solution is to disable key navigation for DBGrids. This feature is

implemented but not published yet. You will be able to disable keyboard

navigation if you want.

 

IMO for a Web DBGrid keyboard navigation is an unnecessary luxury anyway!

Selecting a row with a mouse click seems to be more reasonable and more

accurate.

 

That said, in future releases there will be some core changes so excessive

data input will be handled better by the browser.

 

> Then I tried using runonce UniTimer, enabling it in afterscroll event to

> update detail, it works more stable, but not much. If I fast scroll up and

> down several times, the timer just stops working.

> I evaluated the Vaadin framework before, which is the same server-driven

> events framework as unigui, but uses java instead of pascal, and GWT

> instead of extpascal/extjs. They have a ValueChange event in grid, that

> fires only after scroll is completed for the last selected cell where

> cursor stops, so there are no issues with updates in browsers. Can you

> implement the same functionality in DBGrid, or perhaps can advise a

> workaround?

 

I will investigate it. Logged as #798

 

> p.s. And one more question - is it possible to make autosize

> columns/expanded column to fit grid width without writing custom onresize

> events?

 

Already logged as #555

 

 

.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...