Jump to content

uniDBGrid column lock problem


55143681

Recommended Posts

unigui1507+10.3.2

uniDBGrid maybe has some bugs,

1、see the video,If I change a column to lock,the column will move to the locked columns,but the cell display ERROR_1

2、if column a\b\c all have the same group header,then column a/b/c can not be set to locked,

I think a or b or c should not be set to locked,but a and b and c are the same group ,they should can be set to locked.

Link to comment
Share on other sites

  • 4 years later...

I have a similar problem, with ERROR_1. I my case when I use dbCheckSelect activated (on Design or RunTime) and need reseize columns, but we discovered that the property dgDontShowSelected is the cause for us.

Link to comment
Share on other sites

1.95.0.1577, but this error is older, I face them from 2022, but only now I found the "solution" - don`t use dgDontShowSelected and use a js code for deselectAll() after show form or open query.🙂

Other problem that some times occurs are misalignment.

Look the images with the error.

image.png.903fb3b3c01351fc0bec0313539e8ad8.png

 

Link to comment
Share on other sites

Below is the test case using UniGui's GridCheckSelect demo. In it, the dgDontShowSelected property was already active, and I made use of changes that I commonly make in my system in DrawColumnCell(), such as changing color, hiding columns, this sometimes causes misalignment as in the image and sometimes ERROR_1. But if you turn off dbDontShowSelected (=False) the errors do not occur.
Another thing that can help with tracking down the error is that if it is just the misalignment of the columns as in the attached image, and you click on the Grid's refresh button, the columns are realigned correctly, but if it is ERROR_1 then even that does not solve it. .
I was unable to reproduce ERROR_1 in the test case but it also only occurs on my system if dbDontShowSelected is True.

Hope this helps :) .

Grid Error.png

GridCheckSelect.7z

Link to comment
Share on other sites

Thanks for the answer. So could you suggest me the best Grid event to do this?

Just so you can better understand my scenario, I have a function that runs in this DrawColumnCell event that makes several adjustments to: Width, Title, Hide, Text, etc... in the columns. And the problem always only occurred when I add the Grid checkbox with dbCheckSelect, now I recently discovered that if I turn off dgDontShowSelected the problem stops, but the first line is always marked, because as I learned here on the forum the function of this last one property is just to uncheck the first line of the checked.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...