Jump to content

Row Widget - DestroyOnCollapse Doesn't work (Again)


MarkB

Recommended Posts

Dove in and found out the problem.

Has to do with the two methods of TUniDBGrid 'H_OnExpandBody' and 'H_OnCollapseBody'

The problem is the way the cName is being constructed in each such that the name of the Container in H_OnCollapseBody is not the same as the name constructed in H_OnExpandBody so when it tries to find the container to free it, it's not there.

 

TUniCustomDesktopDBGrid.H_OnExpandBody
  cName := Self.Name + '_' + Self.JSName + '_Row_' + IntToStr(Id);  // cName must be unique through the session


   
TUniCustomDesktopDBGrid.H_OnCollapseBody

cName := Self.Name + '_Row_' + IntToStr(Id);

 

See the difference above.  I tried fixing the H_OnCollapseBody method to produce the right name, using this.JName paramenter and while it worked for that one collapse, after the fact all RowWidgets were broken and would not expand.

This is really simple to see and reproduce, do you really need an example?

  • Upvote 1
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...