Jump to content


Photo

dbgrid


  • Please log in to reply
15 replies to this topic

#1 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 09 October 2016 - 11:20 AM

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.

 


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 09 October 2016 - 11:56 AM

Is possible to have fixed columns in unidbgrids?

 

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

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


  • 0

#3 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 09 October 2016 - 12:03 PM

And have a cell that a button?

 

I can't see this in samples.

 

You can search on the forum:

 

For example:

http://forums.unigui...idbgrid-column/

http://forums.unigui...at-design-time/

...


  • 0

#4 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 10 October 2016 - 09:29 AM

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.


  • 0

#5 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 10 October 2016 - 09:40 AM

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

 

Hi,

 

For now can you try this approach?!:

http://forums.unigui...rid/#entry36515

 

Best regards.


  • 0

#6 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 10 October 2016 - 10:05 AM

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);
    }
}

  • 0

#7 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 10 October 2016 - 10:27 AM

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?


  • 0

#8 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 11 October 2016 - 10:49 AM

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

 

Any idea?

 

Thanks.


  • 0

#9 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10265 posts

Posted 11 October 2016 - 06:00 PM

Locked columns can not be changed after grid is displayed.
  • 0

#10 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 11 October 2016 - 09:46 PM

any workaround?
  • 0

#11 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 12 October 2016 - 05:20 AM

any workaround?

 

Hi,

 

We will try..

 

Best regards.


  • 0

#12 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 12 October 2016 - 03:14 PM

Ok. I'll wait.

 

Right now, I can create the columns at design time (I don't like, but at this moment, I don't have other solution).

 

If I do this, in this way, the solution offered in http://forums.unigui...scroll/?p=33396don't work.

 

Any idea?


  • 0

#13 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 14 October 2016 - 05:22 PM

Right now, I can create the columns at design time (I don't like, but at this moment, I don't have other solution).

 

If I do this, in this way, the solution offered in http://forums.unigui...scroll/?p=33396don't work.

 

Any idea?

 

Hi,

 

Have you use a lockable grid?


  • 0

#14 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 17 October 2016 - 11:00 AM

lockable grid?

 

can you clarify?


  • 0

#15 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 17 October 2016 - 05:43 PM

Hi,

 

lockable grid?

 

can you clarify?

 

I mean grid like in this example:

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

  • 0

#16 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 849 posts

Posted 18 October 2016 - 04:22 PM

I use, grid like the sample.

 

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

 

Thanks.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users