Jump to content

GridEditors - Row Editor. Column Not Ready Only


pro_imaj

Recommended Posts

Hello

When I set UnidbGrid RowEditor := True, all colons ReadOnly := True values can be changed.

As a solution to this, putting the relevant components on the UniHiddenPanel and matching each colon solves the problem, but this is a very laborious way and I don't want to add unihidden panel to the fields I will display only.

Is there an easy way to do this?

In the attached example; Double click on any field in the grid, then try to make changes in the Salary field, which is ReadOnly, and you will see that the change has been made.

GridEditors - Row Editor.zip

Link to comment
Share on other sites

6 minutes ago, Sherzod said:

Hello,

Which build are you using?

On the latest build I couldn't reproduce.

A new build came out today, I didn't install it, I don't know if it's fixed, I'll upload it and let you know.

The structure I am using now: 1.90.0.1563

Link to comment
Share on other sites

I noticed this behavior too when using row editor.
 

as for my solution, i did this too:

1 hour ago, pro_imaj said:

As a solution to this, putting the relevant components on the UniHiddenPanel and matching each colon solves the problem

Link to comment
Share on other sites

35 minutes ago, pro_imaj said:

I expect it can't be edited at all, whereas it allows editing but does not save this edit when saving.

Try this approach:

UniDBGrid1.ClientEvents.ExtEvents ->

function beforeedit(editor, context, eOpts)
{
    if (editor.isRowEditor) {
        var form = editor.getEditor().form;
        form.getFields().each(function(field){
            if (field.column.rdonly) {
                field.disable()
            }
        })
    }
}

 

  • Thanks 1
Link to comment
Share on other sites

31 minutes ago, Sherzod said:

Try this approach:

UniDBGrid1.ClientEvents.ExtEvents ->

function beforeedit(editor, context, eOpts)
{
    if (editor.isRowEditor) {
        var form = editor.getEditor().form;
        form.getFields().each(function(field){
            if (field.column.rdonly) {
                field.disable()
            }
        })
    }
}

 

@Sherzod Thank you for the answer. This is how my problem was solved.

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