Jump to content


Photo

dbgrid column pointer


  • Please log in to reply
1 reply to this topic

#1 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 885 posts

Posted 12 June 2018 - 11:38 AM

Hi.

 

I have this for my dbgrids:

 

  UniSession.AddJS('var ColCells = ".x-grid-cell-headerId-"+'+ (Sender as TUniDBGrid).JSName +'.columnManager.columns['+ IntToStr(colindx) +'].id;'+
                               'Ext.select(ColCells).setStyle("cursor", "pointer");'
  );

 

To change pointer in some columns depending some options in run-time.

 

I don't know why, but this have been working and don't know when or in wich update this don't work.

 

Any idea?

 

Thanks.

 


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5307 posts

Posted 12 June 2018 - 12:57 PM

Hi,

 

Try,

 UniSession.AddJS('var ColCells = ".x-grid-cell-"+'+ (Sender as TUniDBGrid).JSName +'.columnManager.columns['+ IntToStr(colindx) +'].id;'+
                  'Ext.select(ColCells).setStyle("cursor", "pointer");'
 );

Or another solution I think:

procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if ACol = 1 then
    Attribs.Style.Style := 'cursor:pointer'

end;

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users