Jump to content

DbGrid editing - limit column focus


arilotta

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

Link to comment
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);
}
Link to comment
Share on other sites

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