Jump to content

dbgrid column pointer


jahlxx

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.

 

Link to comment
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;
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...