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
Hello,
Please see the below code.
function WebGrid2_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl) { var WebGrid2 = ISGetObject(controlId); var WebGrid1 = ISGetObject("WebGrid1"); WebGrid1.SetFocus(); window.setTimeout(function () { var row = WebGrid1.RootTable.GetRow(0); row.Select(); row.GetCells()[0].ActivateEdit(); }, 500); return true; }
When double clicked a cell in WebGrid2, it will focus, select and activate edit a cell in WebGrid1. Is this what you are looking for?
Regards,Handy
We have a clientside event, OnCellDblClick. You can set return false, to ignore it. May I know, why do you need this? If you don't want to edit the cell by double clicking it, you can set EditOnClick as true.Hope this helps.
I have rewrite OnCellDblClick!WebGrid2:<ClientSideEvents OnCellDblClick="WebGrid2_Dbclick" />
I want to do:
when i DblClick one cell of WebGrid2,the cell lost Focus and one of webgrid1 Get Focus
BUT the problem is that:
when i DblClick one cell of WebGrid2(How to Cancel dblClick Cell into EditState,because I still want to Use Edit!!!!),one cell of webgrid1 Get Focus but at once the cell of webgrid1
lost Focus and the cell of WebGrid2 Get Focus Again
WebGrid2_Dbclick Code:
function WebGrid2_Dbclick() { var grid1 = ISGetObject("WebGrid1"); var grid2 = ISGetObject("WebGrid2"); var totalRowCount = grid1.TotalRows; var paRow = grid2.GetSelectedObject().GetRowObject(); var childRow = grid1.RootTable.NewRow(); var pacell = paRow.GetCells(); var chilcell = childRow.GetCells(); var s1 = pacell.GetNamedItem("商品编号").Text; var s2 = pacell.GetNamedItem("商品名称").Text; var s3 = pacell.GetNamedItem("商品规格").Text; var s4 = pacell.GetNamedItem("包装单位").Text; var s5 = pacell.GetNamedItem("数量").Text; chilcell.GetNamedItem("vouid").SetText(totalRowCount + 1, true); chilcell.GetNamedItem("商品编号").SetText(s1, true); chilcell.GetNamedItem("商品名称").SetText(s2, true); chilcell.GetNamedItem("商品规格").SetText(s3, true); chilcell.GetNamedItem("包装单位").SetText(s4, true); chilcell.GetNamedItem("数量").SetText(s5, true); grid1.XmlHttp.Asynchronous = false; childRow.Update(); grid1.SetFocus(); grid1.RootTable.GetRow(totalRowCount).Select(); grid1.RootTable.GetRow(totalRowCount).GetCells()[1].ActivateEdit(); }
I am sorry but I don't quite understand about your scenario.Could you please explain more?
As you said before, when you double click on a cell in WebGrid2, you will automatically focus in a cell of WebGrid1.I think it is possible. By using your code, select a cell object in WebGrid1 and any changes in WebGrid1.However, it seems you got an issue that you could not focus back or active edit mode in WebGrid2 cell.Please correct me if I am mistaken in understanding your scenario.But as far I checked your snippet codes, you did not focus back into WebGrid2, but you focus into WebGrid1 again.Regards,Handy
NO,DblClick one cell of WebGrid2 then did not focus back into WebGrid1, focus into WebGrid2 again.
(When I DblClick one cell of WebGrid2 ,one cell of webgrid1 Get Focus but at once the cell of webgrid1 lost Focus and the cell of WebGrid2 Get Focus again.I think the reason is:DblClick event cause cell into EditState,can not lostfocus from EditState.what is your suggest?? )
But I want to DblClick one cell of WebGrid2,the cell lost Focus and one of webgrid1 Get Focus !
Hope you can help me!thank you!
Although it is a littie stranger,it solve my problem!
thank you Handy Surya
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