Jump to content
uniGUI Discussion Forums
arilotta

DbGrid editing - limit column focus

Recommended Posts

Hi all,

I have a DbGrid with dgEditing=true.

I would like to limit the columns that can be selected, because some contains icons

and some other are text read-only.

I am struggling with ClientEvents and CellModel, but I not so familiar with JS and

I am wasting too much time.

 

So, how can I limit my grid to only focus on the third column for example ?

 

Thanks you all

 

Andrea

Share this post


Link to post
Share on other sites

Hi,

 

At the moment, the column index is passed through "eOpts", and you can try this approach I think:

function cellModel.beforeselect(sender, record, index, eOpts)
{
    //colIndx = 2
    return (eOpts == 2);
}

Share this post


Link to post
Share on other sites

Hi Delphi Dev, unfortunately I don't have the "beforeselect" event on cellModel, just these 4:

 

- deselect

- focuschange

- select

- selectionchange

 

How come ?

Share this post


Link to post
Share on other sites

Hi Delphi Dev, is "beforeselect" event not supported  in build 1425 ?

Share this post


Link to post
Share on other sites

Hi,

 

Hi Delphi Dev, is "beforeselect" event not supported  in build 1425 ?

 

Unfortunately, does not support

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

×