Jump to content
uniGUI Discussion Forums
jahlxx

dbgrid column pointer

Recommended Posts

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.

 

Share this post


Link to post
Share on other sites

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;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×