Jump to content
uniGUI Discussion Forums
jahlxx

dbgrid

Recommended Posts

Hi all.

 

 

Is possible to have fixed columns in unidbgrids?

 

And have a cell that a button?

 

I can't see this in samples.

 

Thanks.

 

Share this post


Link to post
Share on other sites

Is possible to have fixed columns in unidbgrids?

 

...\FMSoft\Framework\uniGUI\Demos\Desktop\GridColumnLocking

...\FMSoft\Framework\uniGUI\Demos\Desktop\GridColumnLocking_HeaderGrouping

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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);
    }
}

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

I've been making tests, and locked columns are ignored when set the property in run time.

 

Any idea?

 

Thanks.

Share this post


Link to post
Share on other sites

Hi,

 

lockable grid?

 

can you clarify?

 

I mean grid like in this example:

..\FMSoft\Framework\uniGUI\Demos\Desktop\GridColumnLocking

Share this post


Link to post
Share on other sites

I use, grid like the sample.

 

But everything in that sample are at design time, not at run-time.

 

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×