Jump to content

dbgrid


jahlxx

Recommended Posts

Hi.

 

I can't reproduce the button in the grid. I'll keep trying later, when I have more time.

 

For now, I'll color the cell in different color, to simulate the button. But I need 2 things:

 

1.- How can I change the cursor for a column in a dbgrid?

2.- When the column colored to simulate a button, has the focus, the color changes to the standard color of the grid. Can I deactivate this behaviour?

 

 

And for the samples of locked columns: ...\FMSoft\Framework\uniGUI\Demos\Desktop\GridColumnLocking, not works when set the property locked in run-time. I've modified the demo, and checked it. Or maybe I'm forgetting something,

 

Thanks.

Link to comment
Share on other sites

I can't reproduce the button in the grid. I'll keep trying later, when I have more time.

 

For example, you can try to do like this:

 

1. Add empty column.

2. UniDBGrid -> ClientEvents -> ExtEvents -> function reconfigure:

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
{
    // 2 - yourBtnColumn indx
    columns[2].width = 68;
    columns[2].renderer = function(val, meta, rec) {
        // generate unique id for an element
        var id = Ext.id();
        Ext.defer(function() {
            Ext.widget('button', {
                renderTo: id,
                text: 'Action...',
                scale: 'small',
                handler: function() {
                    Ext.Msg.alert("Hello World")
                }
            });
        }, 50);
        return Ext.String.format('<div id="{0}"></div>', id);
    }
}
Link to comment
Share on other sites

Ok. Thanks. Is better option, but change the height of the rows, and is extrange. Clicking the button, the screen blinks.

 

Backing to change the color of the cell, right not is better solution for me, if I solve the issue of the color changing when focus on that "special cell".

 

What about the locked columns?

Link to comment
Share on other sites

  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...