Jump to content

Enable/Disable RowWidget in TUniDBGrid


MarkB

Recommended Posts

3 hours ago, MarkB said:

Just a value from a column from the active Row in the Dataset.

Try to analyze and test...

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
{
    if (sender.hasRowWidget) {
        columns[0].renderer = function(value, data, record) { // rowwidget column
            if (record.get('0') > 2000) { // first field index
                return "" // hide
            } else {
                return '<div class="' + Ext.baseCSSPrefix + 'grid-row-expander" role="presentation" tabIndex="0"></div>';
            }
        }
    }
}

 

  • Like 1
Link to comment
Share on other sites

10 hours ago, Sherzod said:

Try to analyze and test...


function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
{
    if (sender.hasRowWidget) {
        columns[0].renderer = function(value, data, record) { // rowwidget column
            if (record.get('0') > 2000) { // first field index
                return "" // hide
            } else {
                return '<div class="' + Ext.baseCSSPrefix + 'grid-row-expander" role="presentation" tabIndex="0"></div>';
            }
        }
    }
}

Thanks.  I'm new to UniGui so I'm not sure where this code goes.

 

Link to comment
Share on other sites

1 minute ago, Sherzod said:

Can I connect to your PC?

I can't right now.  It's 10 PM here.  I can see the routine when I view source of the page, but I can't figure out how to get to it to debug it.

Maybe you could show a screen shot showing where in the Chrome Debugger I can get to it.

FYI, I will be posting another topic having to do with Aligning Controls in a Detail Frame of the Row Widget Example.

Link to comment
Share on other sites

On 2/28/2020 at 9:51 PM, Sherzod said:

Then when you have time let me know.

So I sort of got it to work.  It makes +/- button invisible but that are is still clickable and when I do, the column goes into RowEdit mode.

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Sorry, is this another question?

Yes.  The plus minus button is not visible, but clicking on the first column where it used to be still responds to mouse clicks and it puts the whole row into edit mode.  I'd expect clicking on that empty space not to have it do anything.

Link to comment
Share on other sites

13 minutes ago, MarkB said:

but clicking on the first column where it used to be still responds to mouse clicks and it puts the whole row into edit mode.  I'd expect clicking on that empty space not to have it do anything.

Please explain. Provide the screenshots, make a simple testcase to understand your issue.

Link to comment
Share on other sites

  • 1 year later...

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