iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi John,
I've fix the code and the second problem (firefox problem) doesn't happen in my local end. Here's the code:
var buttonClick = false; function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); if (buttonClick == false) { var row = WebGrid1.GetSelectedObject().GetRowObject(); if (row.Type == 'Record') { if (row.PreviewRowExpanded) row.CollapsePreviewRow(); else row.ExpandPreviewRow(); } } buttonClick = false; WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready"); return true; } function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl) { var WebGrid1 = ISGetObject(controlId); var el = event.srcElement; if (el != null) { if(el.tagName == "IMG") { if (el.src.indexOf("wg_prexp.gif") != -1 || el.src.indexOf("wg_prcol.gif") != -1) { buttonClick = true; } } } return true; }
For the first issue, I couldn't replicate the issue in our local end. Probably the first problem doesn't happen because there's misconfiguration in my code. Could you give me a simple sample that can reproduce the problem in our local end? To resolve, first problem I need to debug the project here. Sorry for my lack. I will look forward to your feedback so I can assist you further.
Regards,Bernard
Hi Udayan,
Sorry for the late responses. This problem can be solved if we using onkeypress event in some control but WebGrid doesn't have that event. From what I read, onkeypress event doesn't detect esc, ctrl, alt, and shift key. But still we can use OnKeyDown event and I've made work around that might be help you to solve this matter.
Here's the code:
function KeyDown(controlId, tblName, rowIndex, cellIndex) { var WebGrid1 = ISGetObject(controlId); var key; //parameter to search //escape shift key to trigger this event if(event.keyCode == 16) return false; //initial value var flag = false; key = String.fromCharCode(event.keyCode).toLowerCase(); if (!(parseInt(event.keyCode) > 64 && parseInt(event.keyCode) < 91)) { //check if shift key is being pressed or no if(event.shiftKey) { switch(key) { //you can add the special character here case '1': key = "!"; break; case '2': key = "@"; break; } } } //search loop for (var i = WebGrid1.GetSelectedObject().rowIndex + 1; i < WebGrid1.RootTable.GetRowsCount(); i++) { if (key == WebGrid1.RootTable.GetRow(i).GetCell(0).Text.toString().substring(0, 1).toLowerCase()) { WebGrid1.RootTable.GetRow(i).Select(); flag = true; break; } } if (flag == false) { for (var i = 0; i < WebGrid1.GetSelectedObject().rowIndex; i++) { if (key == WebGrid1.RootTable.GetRow(i).GetCell(0).Text.toString().substring(0, 1).toLowerCase()) { WebGrid1.RootTable.GetRow(i).Select(); flag = true; break; } } } return true; }
Hope this helps.
Hi,
I can replicate your issue in our local end. To resolve this, I've make workaround for you. In my workaround, I update the value inside WebCombo B when I clicked Expand ResultBox button. Could you look at my workaround and tell me if there's misconfiguration in my workaround?
From your scenario above, I think the problem occurs because the value on WebCombo B. After you selected 1 item in WebCombo A, WebCombo B load the item inside WebCombo B. But unfortunately, value which set inside WebCombo B ("----") make WebCombo B begin to search item which has the same phrase inside WebCombo B's list of item. If possible, could you let me know how you set the value "----" inside WebCombo B?
Perhaps you can try to delete the initial value in WebCombo B to resolve this problem. If this matter still occurs, please let me know how to reproduce the issue in our local end.
Regards,
Bernard
I've found out your problem. Your WebGrid doesn't have RowHeader and allow grouping feature make row header dynamically. However, I've fixed my code and with this code the problem that you mentioned above doesn't happen. Here's the code:
var buttonClick = false; function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); if (buttonClick == false) { var row = WebGrid1.GetSelectedObject().GetRowObject(); if (row.Type == 'Record') { if (row.PreviewRowExpanded) row.CollapsePreviewRow(); else row.ExpandPreviewRow(); } } buttonClick = false; WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready"); return true; } function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl) { var WebGrid1 = ISGetObject(controlId); var el = event.srcElement; if (el != null) { if(el.tagName == "IMG") { if (el.nameProp == "wg_prexp.gif" || el.nameProp == "wg_prcol.gif") buttonClick = true; } } return true; }
This release still have support in VS 2008. You can download this release in the link above.
I couldn't replicate this problem in our local end. In my sample the image that represent PreviewRow button is on index 1 in cellIndex. Also PreviewRow have index 0 in cellIndex. Could you explain me more detail the step to reproduce this issue? Is there any Row Header on your WebGrid?
Look forward to hear any feedback from you so I can help you further.
Sorry for this inconvenience. I forgot to put some validation on my code. Here's the fix:
var buttonClick = false; function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); if (buttonClick == false) { var row = WebGrid1.GetSelectedObject().GetRowObject(); if (row.Type == 'Record') { if (row.PreviewRowExpanded) row.CollapsePreviewRow(); else row.ExpandPreviewRow(); } } buttonClick = false; WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready"); return true; } function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl) { var WebGrid1 = ISGetObject(controlId); if (cellIndex == 1) { var el = event.srcElement; if (el != null) { if (el.nameProp == "wg_prexp.gif" || el.nameProp == "wg_prcol.gif") buttonClick = true; } } return true; }
Is this problem still occurs after you modified the code? Look forward to hear any feedback from you so I can help you further.
Glad, I can help you. If you have any further question please don't hesitate to ask us.
For this matter, you can check if the preview button already being clicked or not and handle the row by using this code:
var buttonClick = false; function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); if (buttonClick == false) { var row = WebGrid1.GetSelectedObject().GetRowObject(); if (row.Type == 'Record') { if (row.PreviewRowExpanded) row.CollapsePreviewRow(); else row.ExpandPreviewRow(); } } buttonClick = false; WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready"); return true; } function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl) { var WebGrid1 = ISGetObject(controlId); var el = event.srcElement; if (el.nameProp == "wg_prexp.gif" || el.nameProp == "wg_prcol.gif") buttonClick = true; return true; }
For your information, preview button is image in WebGrid. Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname