MarkB Posted February 25, 2020 Share Posted February 25, 2020 When RowWidget is enabled, is it possible to enable/disable (or even make not visible) the Expand/Collapse button on a row by row basis? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 25, 2020 Share Posted February 25, 2020 Hi, Can you please clarify your question? Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 25, 2020 Author Share Posted February 25, 2020 1 hour ago, Sherzod said: Hi, Can you please clarify your question? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 25, 2020 Share Posted February 25, 2020 Do you want to show or hide by condition, by value of a cell? Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 25, 2020 Author Share Posted February 25, 2020 53 minutes ago, Sherzod said: Do you want to show or hide by condition, by value of a cell? Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 26, 2020 Share Posted February 26, 2020 And what condition do you want to use? Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 26, 2020 Author Share Posted February 26, 2020 5 minutes ago, Sherzod said: And what condition do you want to use? Just a value from a column from the active Row in the Dataset. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 26, 2020 Share Posted February 26, 2020 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>'; } } } } 1 Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 26, 2020 Author Share Posted February 26, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 26, 2020 Share Posted February 26, 2020 1 hour ago, MarkB said: 11 hours ago, Sherzod said: Thanks. I'm new to UniGui so I'm not sure where this code goes. UniDBGrid.ClientEvents.ExtEvents -> [Ext.grid.Panel] -> function reconfigure 1 Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 26, 2020 Author Share Posted February 26, 2020 3 hours ago, Sherzod said: UniDBGrid.ClientEvents.ExtEvents -> [Ext.grid.Panel] -> function reconfigure Thanks, I'll try it out. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 27, 2020 Share Posted February 27, 2020 Hi sender.hasRowWidget is undefined. What may be the issue? Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 27, 2020 Share Posted February 27, 2020 13 minutes ago, MOGSY said: sender.hasRowWidget is undefined. What may be the issue? Hello, Please clarify your case, most likely you are not using the RowWidget. Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 28, 2020 Author Share Posted February 28, 2020 On 2/26/2020 at 10:20 AM, Sherzod said: UniDBGrid.ClientEvents.ExtEvents -> [Ext.grid.Panel] -> function reconfigure Just now trying it out. With statement record.get('0') > 2000) Which object is record referring to? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2020 Share Posted February 28, 2020 1 minute ago, MarkB said: record.get('0') > 2000) Which object is record referring to? Hello, To the "first field" of your grid. Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 29, 2020 Author Share Posted February 29, 2020 10 hours ago, Sherzod said: Hello, To the "first field" of your grid. So first Field, as in a Dataset, or first Column in the Grid? Having trouble debugging it, can't find that function in the Chrome Debugger. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 29, 2020 Share Posted February 29, 2020 5 minutes ago, MarkB said: Having trouble debugging it, can't find that function in the Chrome Debugger. Can I connect to your PC? Quote Link to comment Share on other sites More sharing options...
MarkB Posted February 29, 2020 Author Share Posted February 29, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 29, 2020 Share Posted February 29, 2020 Then when you have time let me know. 1 Quote Link to comment Share on other sites More sharing options...
MarkB Posted March 2, 2020 Author Share Posted March 2, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 3, 2020 Share Posted March 3, 2020 6 hours ago, MarkB said: but that are is still clickable and when I do, the column goes into RowEdit mode. Sorry, is this another question? Quote Link to comment Share on other sites More sharing options...
MarkB Posted March 3, 2020 Author Share Posted March 3, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 3, 2020 Share Posted March 3, 2020 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. Quote Link to comment Share on other sites More sharing options...
Masteritec Posted December 5, 2021 Share Posted December 5, 2021 Hi Sherzod, If hide + button is depend on other dataset value how to do it? Like Master Detail 2 dataset design, if no detail record will be hide + sign. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.