fraxzi
-
Posts
237 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Posts posted by fraxzi
-
-
Hi @Sherzod,
Thanks for the insight. However, I searched the forum with keyword "toggleRow" and all samples with .1580 but unfortunately there is no reference sample i could follow.
- Frances
-
12 hours ago, Sherzod said:
Hello @fraxzi
Let's start with some solutions.
You can process it first on the client side to prevent it from collapsing if the grid is in the editing state.
1.
procedure TDetailFrame.UniFrameDestroy(Sender: TObject); begin //Somewhere to prevent collapse of RowWidget if ClientDataSet has changes....??? //MessageDlg('There Are Changes... Save Data Entry?', mtConfirmation, mbYesNoCancel, uMsgCallBack); end;
2. MainForm.Script ->
Ext.onReady(function() { Ext.override(Ext.grid.plugin.RowWidget, { toggleRow: function(rowIdx, record) { if (record && record.node) { var _nestedgrid = Ext.get(record.node).query('.x-grid')[0]; if (_nestedgrid) { var _editingPlugin = Ext.getCmp(_nestedgrid.id).editingPlugin; if (_editingPlugin && _editingPlugin.editing === true) { return false } } } this.callParent(arguments); } }) })
Hi @Sherzod,
I tried the above. The RowWidget still collapse then the messagedlg (with callbackl) prompts.
Would it be possible to disable the collapse button and enable it when needed?
Thanks for the usual assistance.
-Frances
-
On 5/26/2022 at 11:42 PM, Sherzod said:
Hello,
Here is the solution:
1. UniDBGrid1.ClientEvents.ExtEvents ->
function afterrender(sender, eOpts) { sender.view.rowExpander.collapseRow = function(rowIdx) { var rowNode = this.view.getNode(rowIdx), row = Ext.get(rowNode), nextBd = Ext.get(row).down(this.rowBodyTrSelector), record = this.view.getRecord(rowNode), grid = this.getCmp(); if (!row.hasCls(this.rowCollapsedCls)) { row.addCls(this.rowCollapsedCls); nextBd.addCls(this.rowBodyHiddenCls); this.recordsExpanded[record.internalId] = false; this.view.fireEvent('collapsebody', rowNode, record, nextBd.dom); } }; }
2.
private { Private declarations } FPrevRowID: Integer;
3.
procedure TMainForm.UniFormCreate(Sender: TObject); begin FPrevRowID := -1; end;
4.
procedure TMainForm.UniDBGrid1RowExpand(Sender: TUniCustomDBGrid; const RowId: Integer; var RowControl: TControl; Container: TUniContainer); begin if FPrevRowID=-1 then begin FPrevRowID := RowId end else begin UniDBGrid1.JSInterface.JSCall('view.rowExpander.collapseRow', [FPrevRowID]); FPrevRowID := RowId; end; RowControl := TDetailFrame.Create(Container); end;
5.
procedure TMainForm.UniDBGrid1RowCollapse(Sender: TUniCustomDBGrid; const RowId: Integer; Container: TUniContainer); begin if FPrevRowID=RowId then FPrevRowID := -1; end;
Hi @Sherzod,
I tried the above (as is) works well with on-screen rows (I am using .1579) but when I left an open widget and scroll down to open another row it prompts ajax error:
Also, in Grouped dbGrid, if I open row widget on, say, group 1 then open another widget from group 2, the widget willl not expand then the rest of the row widget wont open.
Hoping for your assistance.
Thanks,
Frances
-
-
On 1/18/2024 at 12:16 PM, Sherzod said:
Hello @fraxzi
Yes, you need to modify the code for this, there are several examples on the forum using the reconfigure function that can help you.
You can analyze these examples and apply them in your project, I'll try later.
Hi @Sherzod,
I looked at all available post but still couldn't figure it out.
Could you help me out please.
Thanks,
Frances
-
On 2/22/2023 at 12:56 PM, Sherzod said:
Solution for both cases:
function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var delta=0; if (columns[0].xtype && columns[0].xtype == 'rownumberer') { delta = 1; } var widgetColIndx = 1; //Index without regard to rownumberer columns[widgetColIndx + delta].onWidgetAttach = function(column, widget, record) { widget.setDisabled(record.get(widgetColIndx) == "Blue Angelfish"); }; }
Hi @Sherzod,
I tried this solution with Grouped dbGrid and I couldn't make it work like the one Not Grouped.
Any suggestion?
Thanks,
Frances
-
19 hours ago, Sherzod said:
Well, and what should the rest of the panels look like in this case?
Hi @Sherzod,
You are right. I changed my layout approach.
Thanks much for the best help.
Regards,
Frances
- 1
-
Hi @Sherzod,
Another thing if I may, Hot to set Panel height (fix, sa 50% total of accordion main panel)?
Thanks,
Frances
-
20 hours ago, Sherzod said:
Hello,
This post may help you:
Hi @Sherzod,
Your the man!
Thanks! this is what I needed.
-
Hi Everyone,
How to determine which panel is active (Expanded) on accordion layout?
Regards,
Frances
-
1 hour ago, Sherzod said:
Hello,
Can you reproduce this issue with this demo, for example?
\FMSoft\Framework\uniGUI\Demos\Desktop\MasterDetail
Here's my own app for the test..
Equinox_1573.. This is good with no issue
This is Impulse_1577 with issue (even in filtering)
I will also test with unigui sample as you suggested.
-
Hi all,
On my Master-Detail dbGrid, the detail dataset has delay (or sometimes in random) not displaying records in Impulse 1577 while not on Equinox .1573 ...
FYI: I am using UniDAC on both version.
Any workaround?
Thanks,
Frances
-
On 9/29/2023 at 2:56 PM, Sherzod said:
Okay, you can try to use this approach:
1. UniDBGrid1.ClientEvents.UniEvents ->
function afterCreate(sender) { sender.expandFirstGroup = function() { try { sender.getView().features[0].expand(sender.getView().features[0].dataSource.data.items[0].groupKey) } catch (err) {} } }
2. Usage:
procedure TMainForm.UniButton1Click(Sender: TObject); begin UniDBGrid1.JSInterface.JSCall('expandFirstGroup', []); end;
Yes!!! @Sherzod, works like a charm! Thanks much..
- 1
-
47 minutes ago, Sherzod said:
Isn't everything expanded by default?
Hi,
Yes all expanded.. I copied the code above to collapsed and it did.
i just want to expand the first group by code.
-
2 hours ago, Sherzod said:
Hello,
What are your grid settings?
Hi,
dbgrid-> grouping -> collapsible, summary -> grandtotal
Just normal dbgrid with grouping and summary.
Thanks,
Frances
-
-
-
with the new .1572, theme uni_win11_modern_light checkbox still not centered.
-
I tried, uni_win11_modern_light and uni_win11_modern_light.. but in uni_win10 it is centered.. 😝
-
-
-
-
Hi Everyone,
How about using FontAwesome like "<i class="fa-duotone fa-loader fa-spin-pulse"></i>" instead of using .gif?
Regards,
Frances
-
15 hours ago, Farshad Mohajeri said:
There are various methods to implement WebSockets on IIS. Which method have you preferred?
Hi sir @Farshad Mohajeri
In my case, I use IIS (https) and Hyperserver .. despite of carefully following the manual I still couldn't work it.. but in my DevtEnv (127.0.0.1) websocket is working (also the examples).. I am just saying.
Kind regards,
Frances
- 1
How To prevent dbGrid RowWidget from "Collapse"?
in General
Posted
Hi @Sherzod,
I tried the above but still I couldn't implement. Perhaps the easiest is to enable/disable the expand button?
Thanks for your persistent help.
-Frances