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...

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...