Jump to content


Photo

Few minor problems with grid in slide mode


  • Please log in to reply
90 replies to this topic

#1 Saurman

Saurman
  • Members
  • 44 posts

Posted 26 November 2007 - 03:47 PM

Hello, iam using Nextgrid latest version in slide mode.


Sometimes, when i refresh grid content (begin update, remember selection, clear rows, fill with new content, end update, restore selection), selected row is not drawn. It looks just like grid background, but when i scroll or select this row, it fixes.



Also, even if iam using begin update/end update when changing single row content, i still see some blinks (i think they shouldn't appear)

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 26 November 2007 - 04:36 PM

Hello Saurman,

If you may send me small demo project, this will help. For first help, maybe you can try to call RefreshSlide(NextGrid1.SelectedRow); but maybe it will be better to we find core of a problem.

Maybe calling BeginUpdate/EndUpdate is not neccessary on small changes. Using this function is more recommended for large operations, such as adding more than 1000 rows and setting cells in same loop.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Saurman

Saurman
  • Members
  • 44 posts

Posted 26 November 2007 - 05:18 PM

iam not sure a small demo can repeat this issue. The problem that iam using nextgrid with TMS components, and grid is located in TAdvOfficePager tab. There are also another grids on other tabs. It might be a tms fault with the calling of child's drawling methods (i had this problem with TMemo already)

Anyway, iam attaching piece of code that refreshes grid and grid structure
Attached File  scraps.zip   53.89KB   4 downloads

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 26 November 2007 - 07:06 PM

Hello Saurman,

Thank you for your sample. I am looking at it. I will probably try to construct my own sample and test it.

Can you please tell me, does adding such line:

CODE
LogGrid.RefreshSlide(LogGrid.SelectedRow);


at the end helps?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Saurman

Saurman
  • Members
  • 44 posts

Posted 26 November 2007 - 07:52 PM

i just noticed, it doesnt happen for selected row.
It has something to do with the floating panel on same tab


I have other grids in slide more on other tabs, and they works their just fine. Seams problems is caused by floating panel from TMS pack

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 26 November 2007 - 07:59 PM

Hello Saurman,

Not sure what this may be sad.gif

But, I recommend trying:

CODE
LogGrid.RefreshSlide(LogGrid.SelectedRow);


It should it will help.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 Saurman

Saurman
  • Members
  • 44 posts

Posted 29 November 2007 - 08:03 PM

k few more problems. See attached files
Attached File  bugreport.zip   12.33KB   4 downloads

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 November 2007 - 08:27 PM

Hello Saurman,

Can you please tell me when this error happen? Unfortunatelly error log don't help me.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 Saurman

Saurman
  • Members
  • 44 posts

Posted 29 November 2007 - 08:52 PM

well, i have no clue where it happens aswell, and the bugreport doesnt even shows me a line from my unit, that this AV. I can only say, thats its some paint problems

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 November 2007 - 09:02 PM

Hello Saurman,

Do you maybe can tell me does it happen on some action (like MouseMove over some cell, or click on some button)?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 Saurman

Saurman
  • Members
  • 44 posts

Posted 29 November 2007 - 10:05 PM

i think if it was called from my procedure, this would be reflected in the attached log. Otherwise it can be only caused by windows redraw messages in some special grid conditions. Maybe we should try to wrap the procedure, that produces AV, inty try/except and log all variables, that directly participate in producing an AV (access violation/exception).

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 November 2007 - 11:18 PM

Hello Saurman,

Most probably some action like mouse move causes a repaint and this maybe trigger AV. If you may try to move mouse over some cells, maybe AV will jump.

Also, can you please tell me do you use latest release (v4.2.2 or v4.2.1)?

PS. Does this bug (AV) happen in both modes (Report and Slide)?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Saurman

Saurman
  • Members
  • 44 posts

Posted 29 November 2007 - 11:58 PM

i got a screenshot from mad except vcl. It takes screenshot just at the moment when AV happens. On that screenshot i see, that grid is empty (which means its been totally redrawn), grid is in slide mode. My grid version - latest free (i think 4.2.1)

Tryed moving mouse all over, working fine. Can i get a recompiled NxGrid.dcu with some events loggin in TNextGrid.GetRowVisible function plz? Iam getting this av once per 4-6 mins in my app. Grid refreshes like once per 20-40 secs.

Btw, seams that av occurs only when grid is located on active tab and visible to user.

I just got 3 more reports during last 10 mins, all is pointing to a same piece of code
CODE
main thread ($c18):
004ed95f +013 ISD_dashboard.exe NxGrid               492  +1 TNextGrid.GetRowVisible
004e7757 +04b ISD_dashboard.exe NxCustomGridControl 1319  +5 TNxCustomGridControl.GetSlideTop
004e72e2 +026 ISD_dashboard.exe NxCustomGridControl 1131  +4 TNxCustomGridControl.GetCellTop
004eb7ae +0aa ISD_dashboard.exe NxCustomGridControl 3318 +10 TNxCustomGridControl.DrawSlideCaption
004eace6 +1d2 ISD_dashboard.exe NxCustomGridControl 3066 +42 TNxCustomGridControl.PaintSlidesRows
004eaab9 +011 ISD_dashboard.exe NxCustomGridControl 3005  +2 TNxCustomGridControl.PaintSlides
004ec4ae +2be ISD_dashboard.exe NxCustomGridControl 3578 +37 TNxCustomGridControl.Paint
004b94cf +057 ISD_dashboard.exe Controls                     TCustomControl.PaintWindow


#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 30 November 2007 - 01:45 AM

Hello Saurman,

Maybe this function which refresh grid causes a problem?

I will send you now PM.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#15 Saurman

Saurman
  • Members
  • 44 posts

Posted 03 December 2007 - 04:35 PM

one more stuff.
When multiselect is True, in slide mode


Any chances to get a normal fill, Boki?

#16 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 03 December 2007 - 05:40 PM

Hello Saurman,

Maybe setting aoHighlightSlideCells flag in AppearanceOptions to False may help.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#17 Saurman

Saurman
  • Members
  • 44 posts

Posted 03 December 2007 - 06:16 PM

well, this helps but after that Multiselect=true is not working sad.gif

#18 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 03 December 2007 - 06:25 PM

Hello Saurman,

It work, but there is no indication that cells are selected (due to aoHighlightSlideCells) flag.

I will use to draw Slide frame around all selected slides. This will take several days to complete it.

Thank you.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#19 Saurman

Saurman
  • Members
  • 44 posts

Posted 03 December 2007 - 06:45 PM

one more issue. If iam using that flag, and changing current page, grid is not fully drawn:


This happens only for selected cell

#20 Saurman

Saurman
  • Members
  • 44 posts

Posted 03 December 2007 - 06:48 PM

as for my first issue:
CODE
function TNextGrid.GetRowVisible(Index: Integer): Boolean;
begin
  try
    if RowExist(Index) then
      Result := FCells.Row[Index].Visible and FCells.Row[Index].Shown
    else
      Result := False;

  except
    on e:Exception do begin
      Result := FCells.Row[Index].Visible and FCells.Row[Index].Shown;
    end;
  end;
end;

function TNextGrid.GetRowHeight(Index: Integer): Integer;
begin
  try
    if RowExist(Index) then
      Result := FCells.Row[Index].RowHeight
    else
      Result := 16;
  except
    on e:Exception do begin
      Result := FCells.Row[Index].RowHeight;
    end;
  end;
  DoMeasuringRowHeight(Index, Result); { event }
end;


Still getting this AV. When debugger attached, it moves me to that lines sad.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users