Jump to content

TUniCustomDBGrid.MoveToRow(): Unexpected Row number: 0, 3.


erich.wanker

Recommended Posts

7 minutes ago, Sherzod said:

Sim.

  Grid.ClientEvents.UniEvents.Add(
          'pagingBar.beforeInit=function pagingBar.beforeInit(sender, config) {config.displayInfo = true;}');
 

  Grid.ClientEvents.UniEvents.Add(
  'store.afterCreate=function store.afterCreate(sender)'#13#10'{'#13#10''+
  '  sender.setRemoteSort(false);'#13#10'}');
 

  Grid.ClientEvents.ExtEvents.Add(
          'afterrender=function afterrender(sender, eOpts)'#13#10'{'#13#10'  var me = s' +
          'ender;'#13#10'    if (me.pagingBar) {'#13#10'        me.pagingBar.getCompone' +
          'nt("refresh").handler = function() {'#13#10'            ajaxRequest(me' +
          ', '#39'_refresh'#39', [])'#13#10'        }'#13#10'    }'#13#10#9#13#10'}');
 

I have a unit where I pass the name of the dbgrid and add these options.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...
  • 8 months later...

Hello!

I've found a solution for my MoveToRow-errors.

It seems to be a timing problem. The MoveToRow-function is called to late sometimes.

Example: Take a UniDBGrid connected to a TFDQuery (datasource). Now define a OnDblClickEvent, that close the query and reopen it again (with a different SQL in my case). 
When the user doubleclicks a row, MoveToRow is called but sometimes it's to late, because the query is already closed. So MoveToRow tries to skip inside a closed query, which cause the error.

So the solution is to leave the query open, as long as you can. In my case I changed the whole concept so I can leave the query open.

Hope it helps.

Regards

Mike

Link to comment
Share on other sites

Hi

I have the same issue, using version 1.90.0.1549.

I believe this is happening when one scrolling quick and the data is updated may be by another user. I believe the expected row is moved to different page and position is no longer valid.

Regards

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...

besides the mentioned error I have frequent and also random problems, with the Grid is in dirty state error. No more updates can be applied.

in simple grids, where only one column is editable.

 

the grid is undoubtedly a component that generates a huge amount of requests to the server, sometimes it gets lost between requests, and user actions, I have always activated the loadmask option, so any user action needs to wait by the server's response, and avoids sequential clicks by the user.

it would be very good, if a version of unigui, was worked exclusively in this component.

see that this post was open 4 years ago, it's until today, we have problems with the grid, I'm aware, who in 4 years, unigui has evolved a lot, but in users, we always think it can be improved which is already very good .

  • Like 1
Link to comment
Share on other sites

34 minutes ago, eduardosuruagy said:

Convivo com esse erro há anos e nunca foi resolvido, infelizmente. Acho que o grid merecia uma reformulação, pois é o componente mais usado em todos os sistemas.

in some screens of intense use, I simply abandoned the use of the grid, I create lists in pure html, where the visual result is much prettier, faster, and it doesn't give all these problems, we can make do with what we have..

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