zhyhero
-
Posts
131 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Posts posted by zhyhero
-
-
Hi,
One possible solution I guess
UniDBGrid -> ClientEvents -> ...
function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var me = sender, maxY = 0; me.columnManager.columns.forEach(function(el) { if (el.fedit && el.fedit.getY() > maxY) { maxY = el.fedit.getY() } }); if (maxY > 0) { me.columnManager.columns.forEach(function(el) { if (el.fedit) { el.fedit.setY(maxY - el.fedit.getHeight()); el.fedit.setX(el.fedit.getX() - 5); } }); } }
I have test with these codes and .....column title missing.
And If not every column has filter shows like this(with out these codes).
DBGrid (With codes) Shows
-
Thank you, I will test it when i go home.
-
-
Hi Beginner,
thanks a lot.
But where is "after edit cell" event?
All Extjs events (cell) work well when you navigate (select, etc.) , but not when you in "editing" state;
I need to edit cell, press tab, and edit the next cell (without press Enter), with its value already refreshed (calculate). And naturally without post and edit continuosly dataset....
I test these code with 1.10.0.1456,maybe work for you.
write code in UniDBGrid's OnSetCellValue event
procedure TMainForm.UniDBGrid1SetCellValue(Sender: TObject; ACol,
ARow: Integer; AField: TField; var Value: Variant);
begin
self.UniDBGrid1.DataSource.DataSet.Edit;
self.UniDBGrid1.DataSource.DataSet.FieldByName(self.UniDBGrid1.Columns.Items[Acol].FieldName).Value:=Value;
self.UniDBGrid1.DataSource.DataSet.Post;
end;
-
Thank you,Farshad.
It seems all fixed with 1.10.0.1456.
I will upgrade my project to 1.10.0.1456.
- 1
-
I think he means,dataset.oncaculated only fired when leave unidbgrid current edited row and focus(change to) another row
-
Hello,
Can you please report to support portal too?
http://www.unigui.com/support/support-portal
Best regards,
THX.
Reported.
http://jira.fmsoft.net/servicedesk/customer/portal/4/FSD-272
-
Sorry for my poor english first.
UniDBGRID (unigui 1.10.0.1453 professional / FireFox Browser 59.0.3 X64)
0.Locked column still can not dynamic create(add).
Roweditor has no build in Property to set button's caption ("confirm" and "cancel") to other words .1.After dynamic create(add) columns , both scroll bar can not click and drag.
2.Roweditor buttons paint at diffrent position , first time and other time (no column add or delete operation).3. If roweditor showed once, after dynamic create(add) or delete dbgird columns , roweditor cells paint at wrong postion ,about 5px shift.
4.If roweditor showed once,dynamic create(add) or delete columns may by fire a error "Could not set cell position :row:[x],column:[0]:a is null".
And roweditor can not show after the error. Next time create(add) column will be blank cell and the dbgrid missing columns titles(all blank).
And dbgrid missing dataset (click the refresh icon).
5.Sometimes roweditor will paint with no cells.
And there is a testcase Project1.rar
I had used dbgrids much more in my projects. the new ActionColumn is very good for me.
Thank you for the easy useful and powerful products !
谢谢你们的强力高效易于使用的产品!
-
Finally, I give up to use roweditor……
-
Sorry ?
My App dynamic Create all dataset fields, columns and editors(Tuninumberedit for real number)。
So I try this test,and found this。
-
Have you tried with the above solution?:
with UniDBGrid1 do if RowEditor then JSInterface.JSAddListener('reconfigure', JSControl.JSFunction('me', 'if (me.getPlugin("uniGridEditor")) me.getPlugin("uniGridEditor").editor=null') );
I have tried this ,workable.
but i need the editors……
-
I think , every time loaddata ,the roweditor's single editor's container's width ( html table ) increase 5px
1st time
col1
<table class="x-field x-table-plain x-form-item x-form-type-text x-box-item x-field-default x-hbox-form-item" role="presentation" id="textfield-1048" style="table-layout: fixed; width: 345px; right: auto; left: 2px; top: 0px; margin: 0px;" cellpadding="0"><tbody><tr role="presentation" id="textfield-1048-inputRow" class="x-form-item-input-row"><td role="presentation" id="textfield-1048-labelCell" style="display:none;" halign="left" class="x-field-label-cell" width="105" valign="top"><label id="textfield-1048-labelEl" for="textfield-1048-inputEl" class="x-form-item-label x-unselectable x-form-item-label-left" style="width:100px;margin-right:5px;" unselectable="on"></label></td><td role="presentation" class="x-form-item-body " id="textfield-1048-bodyEl" colspan="3" style="width: 100%;"><input id="textfield-1048-inputEl" role="textbox" size="1" name="0" class="x-form-field x-form-text" autocomplete="off" data-errorqtip="" style="width: 100%;" type="text"></td></tr></tbody></table>
col2
<table class="x-field x-table-plain x-form-item x-form-type-text x-box-item x-field-default x-hbox-form-item" role="presentation" id="textfield-1053" style="table-layout: fixed; width: 345px; right: auto; left: 352px; top: 0px; margin: 0px;" cellpadding="0"><tbody><tr role="presentation" id="textfield-1053-inputRow" class="x-form-item-input-row"><td role="presentation" id="textfield-1053-labelCell" style="display:none;" halign="left" class="x-field-label-cell" width="105" valign="top"><label id="textfield-1053-labelEl" for="textfield-1053-inputEl" class="x-form-item-label x-unselectable x-form-item-label-left" style="width:100px;margin-right:5px;" unselectable="on"></label></td><td role="presentation" class="x-form-item-body " id="textfield-1053-bodyEl" colspan="3" style="width: 100%;"><input id="textfield-1053-inputEl" role="textbox" size="1" name="1" class="x-form-field x-form-text" autocomplete="off" data-errorqtip="" style="width: 100%;" type="text"></td></tr></tbody></table>
2nd time
col1
<table class="x-field x-table-plain x-form-item x-form-type-text x-box-item x-field-default x-hbox-form-item" role="presentation" id="textfield-1085" style="table-layout: fixed; right: auto; left: 2px; top: 0px; width: 350px; margin: 0px;" cellpadding="0"><tbody><tr role="presentation" id="textfield-1085-inputRow" class="x-form-item-input-row"><td role="presentation" id="textfield-1085-labelCell" style="display:none;" halign="left" class="x-field-label-cell" width="105" valign="top"><label id="textfield-1085-labelEl" for="textfield-1085-inputEl" class="x-form-item-label x-unselectable x-form-item-label-left" style="width:100px;margin-right:5px;" unselectable="on"></label></td><td role="presentation" class="x-form-item-body " id="textfield-1085-bodyEl" colspan="3" style="width: 100%;"><input id="textfield-1085-inputEl" role="textbox" name="0" class="x-form-field x-form-text" autocomplete="off" data-errorqtip="" style="width: 100%;" type="text"></td></tr></tbody></table>
col2
<table class="x-field x-table-plain x-form-item x-form-type-text x-box-item x-field-default x-hbox-form-item" role="presentation" id="textfield-1086" style="table-layout: fixed; right: auto; left: 357px; top: 0px; width: 350px; margin: 0px;" cellpadding="0"><tbody><tr role="presentation" id="textfield-1086-inputRow" class="x-form-item-input-row"><td role="presentation" id="textfield-1086-labelCell" style="display:none;" halign="left" class="x-field-label-cell" width="105" valign="top"><label id="textfield-1086-labelEl" for="textfield-1086-inputEl" class="x-form-item-label x-unselectable x-form-item-label-left" style="width:100px;margin-right:5px;" unselectable="on"></label></td><td role="presentation" class="x-form-item-body " id="textfield-1086-bodyEl" colspan="3" style="width: 100%;"><input id="textfield-1086-inputEl" role="textbox" name="1" class="x-form-field x-form-text" autocomplete="off" data-errorqtip="" style="width: 100%;" type="text"></td></tr></tbody></table>
-
by default ,leave HeaderTitle blank,the header bar is unvisible
(desktop app mode)
-
try ' ' without quote
-
UniDbGrid was setup with null columns ,and roweditor is true.
when the 1st time click the button to load data,roweditor showed correct,
from the 2nd time load data ,roweditor shows wrong like the picture.
and adoquery(with a sql ) shows same effect (2nd time load data).
What was i missed?
(test with 1.0.0.1424 and 1.0.2.1442)
test demo
-
Hello,Something strange is happening when I use the ActionButtons, if it has the Last option, it gives the error of IMG1 when clicking Confirm of RowEditor, and if it is First it gives the error of IMG2
I met this before,and i don't know why this happend.
There is a way can by pass this.
You can try made a useless field with you SQL (like "select 0 as uselessfield,* from you table"),and made a unvisible colunm with this field at the 1st position in columns
Hope you lucky.
Maybe the new beta unigui can solve it
-
Hi,
Don't worry about limited knowledge, just keep pushing forward and studying.
Have a nice day
Thank you for your suggestions.
-
Add 6 properties TopBarButtons,BottomBarButtons,HeaderButtons,TopBarButtonsEvent,BottomBarButtonsEvent,HeaderButtonsEvent
and 3 events OnTopBarButtonAction,OnBottomBarButtonAction,OnHeaderButtonAction
Only buttons.
These can use like the ActionButtons.
Maybe useful.
And codes were in a mess with my limited program knowledge.
- 1
-
New modify.
Add roweditor's ConfirmBtnText(saveBtnText) and CancelBtnText(cancelBtnText).
Maybe useful.
The key codes are from Post#16 http://forums.unigui.com/index.php?/topic/8414-questions-about-unidbgrid/#entry47669
- 1
-
I modified BMUniDBGrid.pas's codes again.
Before that,I got an error - " 'null' is not a valid integer value " when I try to click the roweditor's 'confirm' button ( AcitonColumn and RowEditor are both set with BMUniDBGrid ) 。
Finaly,I find a way to by pass this error. But I don't know why this is work.
'dataIndex:"0",'
-
I modified BMUniDBGrid.pas's codes to add three properties. These are uesful to me.
ActionColumnAlignment
ActionColumnTitle
ActionColumnLocked
-
Hi,
Which edition and build are you using ?
v 0.99.96.1346 pro com
and v 1.0.0.1424 can also try to do this as globe change.
These texts are not in Extjs locale files.
-
Hi Georges
Not yet, mainly beacuse it is in beta stage and can't coexist two versions of UNIGUI, I should tried to do it in a VM. So, it is possible for next week to have a version for uniGUI-ExtJS 5.6
Thanks for ask.
Hi Bresler, thank you at first!
Where can i find the last version BMUniDBGrid for unigui 1.0.0.
And i got "'null' is not a valid integer value." error when i try to use bmunidbrid‘s both actioncolumn and roweditor by click the roweditor's confirm button.
-
Find another way to modify the text of roweditor's 'confirm' and 'cancel' button.
in unibasicgrid unit,change the red color code to your string. (the old version)
Or in Vcl.consts unit,change the value of SMsgDlgCancel and SMsgDlgConfirm.
procedure TUniBasicGrid.ConfigLoadCompleted;
begin
if FHeaderTitle<>'' then
begin
JSConfig('title', [FHeaderTitle]);
JSConfig('titleAlign', [GetAlignWebText(FHeaderTitleAlign)]);
end;
if FCellCursor<>crDefault then
JSAssign('xcursor', [Cursor2Web(FCellCursor)]);
if not FStripeRows then
JSConfigObject('viewConfig', 'stripeRows', [FStripeRows]);
if not FTrackOver then
JSConfigObject('viewConfig', 'trackOver', [False]);
if gcfgSupportsEditor in FInternalConfig then
begin
if FRowEditor then
begin
JSConfigPlugin('Ext.grid.plugin.RowEditing',
[
'pluginId','uniGridEditor',
'isRowEditor', True,
'cancelBtnText', uniRemoveAmp(SMsgDlgCancel),
'saveBtnText', uniRemoveAmp(SMsgDlgConfirm),
'clicksToEdit', FClicksToEdit,
'editorCfg', JSObject([
'listeners', JSObject([
'beforehide', JSObject([
'fn', JSFunction('me', 'return(me.canhide === true)'),
'scope', JSStatement('this')
])
])
]),
'listeners', JSObject([
'beforeedit', JSObject([
'fn', JSFunction('me, context', 'return (!context.grid.rdonly)')
])
])
]
);
end
else
begin
JSConfigPlugin('Ext.grid.plugin.CellEditing',
[
// 'triggerEvent', 'cellfocus',
'pluginId','uniGridEditor',
'clicksToEdit', FClicksToEdit
]
);
end;
end;
Selected record
in General
Posted
Maybe you can try conditional font color