tag:blogger.com,1999:blog-8832291873344926372.post3528599389093575942..comments2024-03-24T14:03:17.111-04:00Comments on Cape Cod Gunny - Michael Riley: XE4 dbGrid Still Buggy - Please Vote Up QC 98255 Michael Rileyhttp://www.blogger.com/profile/15959746627356186242noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8832291873344926372.post-1954690072105200092013-06-04T06:07:05.924-04:002013-06-04T06:07:05.924-04:00Sometimes order by one title click is not a hopefu...Sometimes order by one title click is not a hopeful behavior.<br />There are some ways to order data. The best way depends on the situation: components, query size, etc.<br />If you always want order by on title click using the same method, I suggest you to create a inherited class that set a default OnTitleClick event.It's easy and you need do it only one time.Nelson H C Nepomucenohttps://www.blogger.com/profile/07082674064351884281noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-43380868377963997112013-06-03T06:30:39.674-04:002013-06-03T06:30:39.674-04:00I agree, that this line looks unprofessional, but ...I agree, that this line looks unprofessional, but unfortunately it's not a bug. Try to use TXDBGrid instead of TDBGrid.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-91328229428519416832013-06-02T21:50:34.616-04:002013-06-02T21:50:34.616-04:00@Olaf - Ugly isn't really a bug. They could j...@Olaf - Ugly isn't really a bug. They could just as easily use the code to draw a little triangle indicator.<br /><br />And actually, XORing the screen with indicators like this is VERY old school for Windows and has lots of precedence (tho now everyone wants fancy rendered previews. I think that might be beyond EMBT's current skill pool, or perhaps being generous - their budget)<br /><br />Still, they could have made the code more flexible to allow better rendering. And yes, @Michael, maybe it should be reserved for once the column has started moving.<br /><br />Still, the TDBGrid is an AWEFUL component, and you should consider one of the many EXCELLENT third party dbGrids out there. DevExpress has my money, but there are other good ones out there from TMS and the like as well - considering how much they add to your project, it is a small investment for a LOT of time saved in adding functionality.Xepolhttps://www.blogger.com/profile/07501635065767343244noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-21787778310464838172013-06-02T19:39:52.691-04:002013-06-02T19:39:52.691-04:00@Olaf - I read the comments you and Clinton added ...@Olaf - I read the comments you and Clinton added to the QC. I did not understand that the intent of the black bar was to indicate the new location of a column that is in the process of being moved.<br /><br />If that is the intent, then I think a black bar indicator should only appear if both an onTitleClick event and onMouseMove event happen simultaneously. Perhaps this could be called an onTitleDrag or onColumnMoving event.<br /><br />EMBT could also give us the ability to choose our own column moving color. Michael Rileyhttps://www.blogger.com/profile/15959746627356186242noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-66973552754126553872013-06-02T11:33:12.228-04:002013-06-02T11:33:12.228-04:00Apparently there is some confusion, if this behavi...Apparently there is some confusion, if this behavior might be "as designed". <br />I would agree though, that this black line is at least "odd". <br /><br />I also don't see any precedence (in common Windows apps) that would show this behavior, so I vote to accept that as a visualization bug. <br /><br />Olaf Monien<br />EMBT MVPOlaf Monienhttps://www.blogger.com/profile/02628979334210981429noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-73654188517171964742013-06-02T11:08:45.135-04:002013-06-02T11:08:45.135-04:00The problem is that you are reporting the intended...The problem is that you are reporting the intended behaviour as a bug. I'm surprised they have not just closed the bug as resolved, will not change.<br /><br />The code that upsets you so is TCustomGrid.DrawMove, it represents the insertion point for column dragging. There are a few code injection routines that might help, but here is a hack that will help if you do not need column dragging:<br /><br />Add:<br /><br />Type<br /> TMyCustomGrid=Class(TCustomGrid)<br /> End;<br /><br />And in your form.Create, and anywhere you modify options on the dbgrid:<br /><br /> TMyCustomGrid(DBGrid1).Options := TMyCustomGrid(DBGrid1).Options-[goColMoving];<br /><br />Assuming your TDBGrid is called DBGrid1.Xepolhttps://www.blogger.com/profile/07501635065767343244noreply@blogger.com