Jump to content

Recommended Posts

Posted

I haven't find any way to get in dbgird one cell underlined when hover cursor over. Is there any way to do that?

Hover over is easy to handle with CSS, but that hapens for all cells (columns) in focused row and I want only particular cell is working that way.
The idea is that when user hover over some cells there comes underline and handcursor when there is possible to click that cell to get something more from that. 

Posted
2 hours ago, degerjy said:

I haven't find any way to get in dbgird one cell underlined when hover cursor over. Is there any way to do that?

Hover over is easy to handle with CSS, but that hapens for all cells (columns) in focused row and I want only particular cell is working that way.
The idea is that when user hover over some cells there comes underline and handcursor when there is possible to click that cell to get something more from that. 

Hello,

One possible solution (demo: \FMSoft\Framework\uniGUI\Demos\Desktop\GridEditors).

1. UniServerModule.CustomCSS

.x-cursor-pointer {
  cursor:pointer !important;
}

.x-cursor-pointer:hover {
  text-decoration: underline; 
}

2. UniDBGrid1.ClientEvents.ExtEvents ->

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    //for the second column = LastName
    columns[1].renderer = function (value, meta, record) {
        meta.tdCls += 'x-cursor-pointer'; 
        return value;
    };
}

3. 

procedure TMainForm.UniDBGrid1CellClick(Column: TUniDBGridColumn);
begin
  if Column.FieldName = 'LastName' then
    ShowMessage(Column.Field.Value);

end;

 

Posted
On 9/2/2020 at 9:29 PM, Sherzod said:

Hello,

One possible solution (demo: \FMSoft\Framework\uniGUI\Demos\Desktop\GridEditors).

1. UniServerModule.CustomCSS


.x-cursor-pointer {
  cursor:pointer !important;
}

.x-cursor-pointer:hover {
  text-decoration: underline; 
}

2. UniDBGrid1.ClientEvents.ExtEvents ->


function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    //for the second column = LastName
    columns[1].renderer = function (value, meta, record) {
        meta.tdCls += 'x-cursor-pointer'; 
        return value;
    };
}

3. 


procedure TMainForm.UniDBGrid1CellClick(Column: TUniDBGridColumn);
begin
  if Column.FieldName = 'LastName' then
    ShowMessage(Column.Field.Value);

end;

 

Sorry to say, but I couldn't get that work. No underline when hoovering over and at the same time all formats of that field (color, bold...) was gone.

 

Posted
1 minute ago, degerjy said:

Sorry to say, but I couldn't get that work. No underline when hoovering over and at the same time all formats of that field (color, bold...) was gone.

Hello,

Sorry, can you please make a simple app to check? 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...