Masteritec
-
Posts
191 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Masteritec
-
-
7 minutes ago, Sherzod said:
I think we need to reconsider our decisions with you.
Please tell me again the main goal, what would you like to achieve.
1. Column A, Column B, Column C, Column D
2. Column D read only is depend on Column A is empty or not. If Column A empty then Column D can't assign value.
3. Customer allow to move Column position.
-
Hi,
I want to check if column is 'Last Name' or 'First Name' in beforeedit like below:
Quotefunction beforeedit(editor, context, eOpts)
{
if ((context.field == 1) || (context.field == 2)) {
return ajaxRequest(this, "GridEditing", ["colIdx="+context.field], false).responseText == "true";
};
}But if column change position will get wrong, any solution?
Column no change checking is correct:
Column changed checking is incorrect:
-
Hi,
It work well, thank you.
- 1
-
17 minutes ago, Sherzod said:
Maybe I don't quite understand your case, could you re-create the test case to see the problem?
Refer below: colIdx 4 is not City, cause i hide few columns. Refer test case
-
10 minutes ago, Sherzod said:
You may need dataIndex?
Only Index, but also can't match with context.colIdx.
-
Hi,
context.colIdx return is not match with Column.ColID when some column is hide.
Eg. Column1 - Visible, Column2 - Visible, Column3 - Visible, Column4 - Hide, Column5 - Hide, Column6 - Visible,
Column6 - context.colIdx is 3, but Column.ColID is 6.
Any solution match with context.colIdx?
-
This work well. Thanks
- 1
-
Hi,
Thanks for reply.
If Delphi function return True/False, how to pass back to JS?
like below: LockColumn(context.colIdx) return True/False
function beforeedit(editor, context, eOpts)
{
return MainForm.LockColumn(context.colIdx);
} -
1. Delphi has LockColumn function to determine column is readonly or not.
function TMainForm.LockColumn(ColIdx: Integer): boolean;
begin
if ColIdx in [1,2] then
begin
Result:= ClientDataSet1.FieldByName('EmpNo').AsInteger < 20;
end;
end;2. UniDBGrid -> ClientEvents -> ExtEvents -> beforeedit to call LockColumn.
function beforeedit(editor, context, eOpts)
{
return MainForm.LockColumn(context.colIdx);
}Please refer sample, can't call LockColumn to get lock or not
-
Hi,
If current column 'field a' position is 2 then we can use e.record.get("1");
but if move column 'field a' position to other (like 4 or 5 or etc.) then we how to get it?
-
Hi,
If the column position can be moving then how to get column value when position change?
-
-
On 4/10/2020 at 1:30 PM, Sherzod said:
Hello,
For example, you can try this:
procedure TMainForm.UniButton1Click(Sender: TObject); begin with UniDBGrid1 do JSInterface.JSCall('setEditor', [UniComboBox1.JSControl], ColumnByName('city').JSColumn); with UniComboBox1 do JSInterface.JSAssign('valueField', ['val']); end;
Prompt Error : setEditor is not a function
-
7 minutes ago, x11 said:
delete cookie?
UniGuiApplication.UniApplication.Cookies.SetCookie('myCookieUserLogin', '', Date-1, False)
Still same, Attached is my source.
Thanks in advance
-
11 minutes ago, x11 said:
UniSession.Terminate;
Still Prompt Login Screen
-
When Mobile Apps press close button in Main Form, how come always show Login form?
Can we show Web session terminated. Restart application?
Please advice
-
How to navigate to other tab sheet for tunimtabpanel got a lot tab sheet.
Please advice
-
On 11/4/2020 at 3:48 AM, Sherzod said:
Try these changes:
function beforeInit(sender, config) { config.loadingText='Loading...'; config.grouped=false; config.itemTpl= new Ext.XTemplate( '<tr><td><span style="font-size:18px;font-weight:bold;padding-top:4px;padding-left:5px;">{0}</span></td></tr>'+ '<table class="tblstock">'+ '<tr>' + '<td>'+ '<img src={5} width="120" height="120"/>' + '</td>'+ '<td>'+ '<table class="tblStockDescr">' + '<tr><td style="font-size:13px;padding-top:4px;padding-left:5px;line-height:1.2;">{1}{2}</td></tr>'+ '<tr><td style="font-size:13px;font-weight:bold;color:black;padding-top:4px;padding-left:5px;line-height:0.8;">Balance : {4}</td></tr>'+ '<tr><td style="font-size:13px;font-weight:bold;color:blue;padding-top:4px;padding-left:5px;line-height:0.8;">MYR 999,999.99</td></tr>'+ '<tr><td><input type="number" id="seqty{0}" value="1" min="1" /></td></tr>' + '<tr><td><input type="button" class="addtocartbutton" value="Add to Cart" data-id="{0}"></td></tr>' + '</table>' + '</td>' + '</tr>' + '</table>' ); }
function afterCreate(sender) { Ext.getCmp(sender.id).bodyElement.addListener('click', function(event, target) { if (target.getAttribute('class') === 'addtocartbutton') { var qty = 12; ajaxRequest(sender, "ADDTOCART", ['stockcode='+target.getAttribute('data-id'), 'qty='+Ext.get("seqty"+target.getAttribute('data-id')).getValue()]); } }, null, { delegate: 'table input' }); }
Attached is test case source code & Video for you to refer.
Above code only ok for first time form show.
Refer video
First time click Show Cart -> Select 1221 -> Change Value to 5 -> Add to Cart -> ajaxRequest Show Message Correct.
Close the Sreen
Second time click Show Cart -> Select 1221 -> Screen value no change default to 1 -> Add to Cart -> ajaxRequest Show Message wrong
it take back previos value and now whatever value you change it always show 5 only
Please help
-
How about check box combo box for mobile?
-
6 hours ago, Sherzod said:
Try these changes:
function beforeInit(sender, config) { config.loadingText='Loading...'; config.grouped=false; config.itemTpl= new Ext.XTemplate( '<tr><td><span style="font-size:18px;font-weight:bold;padding-top:4px;padding-left:5px;">{0}</span></td></tr>'+ '<table class="tblstock">'+ '<tr>' + '<td>'+ '<img src={5} width="120" height="120"/>' + '</td>'+ '<td>'+ '<table class="tblStockDescr">' + '<tr><td style="font-size:13px;padding-top:4px;padding-left:5px;line-height:1.2;">{1}{2}</td></tr>'+ '<tr><td style="font-size:13px;font-weight:bold;color:black;padding-top:4px;padding-left:5px;line-height:0.8;">Balance : {4}</td></tr>'+ '<tr><td style="font-size:13px;font-weight:bold;color:blue;padding-top:4px;padding-left:5px;line-height:0.8;">MYR 999,999.99</td></tr>'+ '<tr><td><input type="number" id="seqty{0}" value="1" min="1" /></td></tr>' + '<tr><td><input type="button" class="addtocartbutton" value="Add to Cart" data-id="{0}"></td></tr>' + '</table>' + '</td>' + '</tr>' + '</table>' ); }
function afterCreate(sender) { Ext.getCmp(sender.id).bodyElement.addListener('click', function(event, target) { if (target.getAttribute('class') === 'addtocartbutton') { var qty = 12; ajaxRequest(sender, "ADDTOCART", ['stockcode='+target.getAttribute('data-id'), 'qty='+Ext.get("seqty"+target.getAttribute('data-id')).getValue()]); } }, null, { delegate: 'table input' }); }
Thanks your help
-
9 minutes ago, Sherzod said:
Make a simple testcase if possible.
Please refer my test case
- 1
-
24 minutes ago, Sherzod said:
Hello,
Can you please explain in more details. Testcase?
Current i able to return {0} to AjaxRequest when click Add to Cart Button,
Beside that , i also need usert to input quantity using Spin edit, then only click Add to Cart then return to AjaxRequest,
I don't know to pass spin edit value to ajax request.
Please help
-
function beforeInit(sender, config)
{
config.loadingText='Loading...';
config.grouped=false;
config.itemTpl= new Ext.XTemplate(
'<tr><td><span style="font-size:18px;font-weight:bold;padding-top:4px;padding-left:5px;">{0}</span></td></tr>'+
'<table class="tblstock">'+
'<tr>' +
'<td>'+
'<img src={5} width="120" height="120"/>' +
'</td>'+
'<td>'+
'<table class="tblStockDescr">' +
'<tr><td style="font-size:13px;padding-top:4px;padding-left:5px;line-height:1.2;">{1}{2}</td></tr>'+
'<tr><td style="font-size:13px;font-weight:bold;color:black;padding-top:4px;padding-left:5px;line-height:0.8;">Balance : {4}</td></tr>'+
'<tr><td style="font-size:13px;font-weight:bold;color:blue;padding-top:4px;padding-left:5px;line-height:0.8;">MYR 999,999.99</td></tr>'+
'<tr><td><input type="number" id="seqty" value="1" min="1" /></td></tr>' +
'<tr><td><input type="button" class="addtocartbutton" value="Add to Cart" data-id="{0}"></td></tr>' +
'</table>' +
'</td>' +
'</tr>' +
'</table>'
);
}function afterCreate(sender)
{
Ext.getCmp(sender.id).bodyElement.addListener('click', function(event, target) {
if (target.getAttribute('class') === 'addtocartbutton') {
var qty = 12; <== How to get back value from spin edit ID seqty?
ajaxRequest(sender, "ADDTOCART", ['stockcode='+target.getAttribute('data-id'), 'qty='+qty]);
}
}, null, {
delegate: 'table input'
});
} -
Hi, Good news, when release?
How to call Delphi function in ClientEvent
in General
Posted
Hi,
Any solution for it?
thanks