arilotta Posted July 3, 2017 Posted July 3, 2017 Hello, even though I enable the dgIndicator in UniDbgrid, and the relative column column is added, at runtime I don't see any indicator. Am I missing something ? Thanks Andrea Quote
Sherzod Posted July 3, 2017 Posted July 3, 2017 Hi, Sorry, can you clarify your issue again and if possible make a simple testcase for this ? Best regards, Quote
arilotta Posted July 4, 2017 Author Posted July 4, 2017 Sure, I've prepared a simple test case, see link below on Google Drive. It is quite simple: under the UniDbGrid Options section there is the dgIndicator flag, which is supposed to show the grid indicator in the first column of the selected row (a small triangle). At runtime, on the contrary, no grid indicator is shown even though dgIndicator is true. https://drive.google.com/open?id=0BweO-SJUx1waaEVJUURoT3A1Sjg Thank you Quote
arilotta Posted July 4, 2017 Author Posted July 4, 2017 Thank you Hayri for letting me know. Regards Andrea Quote
arilotta Posted July 24, 2017 Author Posted July 24, 2017 Hi, I'm trying to achieve the grid indicator feature by adding as the first column and image showing a triangle that resembles the well known standard Delphi grid indicator. The problem I am facing here is that it has to be shown only on the selected row, while it should be hidden for all the other rows. Ideas on how to achieve this ? Thanks Quote
Sherzod Posted July 24, 2017 Posted July 24, 2017 Hi, In your case dgRowSelect = True or ? Best regards, Quote
Sherzod Posted July 25, 2017 Posted July 25, 2017 Hi,Ok, a bit later I will try to give you a solution. Quote
Sherzod Posted July 26, 2017 Posted July 26, 2017 Hi, Something like this: CustomCSS: .custom-grid .x-grid-row-selected .x-grid-cell-first { background-image: url(/files/bullet.png); background-repeat: no-repeat; } function beforeInit: function beforeInit(sender, config) { config.cls = 'custom-grid'; } Best regards, Quote
arilotta Posted August 22, 2018 Author Posted August 22, 2018 Hi Delphi Dev, getting back again to you... Is it possible to achieve the same result with dgRowSelect=FALSE and dgEditing=TRUE ? Thanks Andrea Quote
arilotta Posted August 23, 2018 Author Posted August 23, 2018 I've found a possible solution looking at thread: http://forums.unigui.com/index.php?/topic/6884-unidbgrid-rowselect/?hl=selectionchange&do=findComment&comment=35012 In addition to use "cellModel.deselect" and "cellModel.selectionchange", I used grid OnAfterLoad event to initialize the grid afetr being loaded: procedure TFrameDlgEvent20011.GRDCatAfterLoad(Sender: TUniDBGrid); begin UniSession.AddJS(GRDCat.JSName+'.view.getNode('+IntToStr(GRDCat.CurrGridRow)+').className = ''x-grid-row x-grid-data-row x-grid-row-selected'''); end; CurrGridRow is the CurrRow protected property defined in TUniBasicGrid that can be accessed using the usual THackGrid trick or a class helper, like a did (to access protected members....): type TUniDBGridHelper = class helper for TUniDBGrid ... ... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.