Jump to content

Changing cursor of a column in a UniDBGrid


bbm

Recommended Posts

Hi,

 

If I understand correctly you, can you try this approach?!

 

UniDBGrid->OnAfterLoad event:

procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid);
var
  colindx: byte;
begin
  // your Column Index
  colindx := 2;

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

Best regards.

Link to comment
Share on other sites

@Delphi Developer and @Farshad Mohajeri

Hello, I'm still try covert my delphi project's one form to unigui. there is no help no any documents. Ist it possible, your and other answer share in on topics? and I think will be much better, example be in form. just share this pas and dfm via zip file in topic or download section. For example I don't how to change label form color etc. another one, TUnidbEdit (TUniEdit as well) OnChange events NOT work like delpi's. In delphi, if data move next or previus, dbedit onchange event triggered. looking for this, but I couldn't find any helph about that.

Topic can bi read only like "Feature Requests" and just moderators add message and files.

 

regards

Link to comment
Share on other sites

  • 3 months later...

Hi,

 

And what about a hint? Is possible to show a hint in some columns of the gris when the mouse is over?

 

Can help you, try:

 

http://forums.unigui.com/index.php?/topic/4029-how-to-put-a-hint-on-a-tunidbgrid-column-or-maybe-only-on-the-title-of-the-column/

http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip/

 

Best regards.

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

Do you want like this ?!:

function reconfigure(sender, store, columns, oldStore, the, eOpts){  
   var tip = Ext.create('Ext.tip.ToolTip', {
      
       //for all columns
       target: sender.headerCt.id,   
       html: '<b>T</b>est'
   });
}

Best regards.

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

Hi,

 

how can I change the cursor of a special column in the version 6.5.3?

The script of DD is not working anymore.

 

Best regards

 

One possible fast solution I think:

procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid);
var
  colindx: byte;
begin
  // your Column Index
  colindx := 2;

  UniDBGrid1.JSInterface.JSCode('var me='#1'; Ext.defer(function(){Ext.select(me.columnManager.columns['+ IntToStr(colindx) +'].getCellSelector()).setStyle("cursor", "pointer")}, 100);');
end;

Best regards,

Link to comment
Share on other sites

  • 11 months later...

Sorry but for me do not work.

I use C++Builder and I have translated delphi code to:

    Sender->JSInterface->JSCode( "var me='#1'; Ext.defer( function(){Ext.select(me.columnManager.columns[" +IntToStr( index) +"].getCellSelector()).setStyle(\"cursor\", \"pointer\")}, 100);");
 

I have missed somethings?

thanks!

Link to comment
Share on other sites

19 hours ago, Mirco said:

I use C++Builder and I have translated delphi code to:

    Sender->JSInterface->JSCode( "var me='#1'; Ext.defer( function(){Ext.select(me.columnManager.columns[" +IntToStr( index) +"].getCellSelector()).setStyle(\"cursor\", \"pointer\")}, 100);");
 

I have missed somethings?

not sure something is missing here

 

However, can you try to use ClientEvents too?

UniDBGrid -> ClientEvents -> ExtEvents -> function store.load:

function store.load(sender, records, successful, operation, eOpts)
{
    me=this.grid;
    colIndx=2;
    Ext.defer(function() {
        Ext.select(me.columnManager.columns[colIndx].getCellSelector()).setStyle("cursor", "pointer")
    }, 500);    
}

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...