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 ALL,
We are having a functionality of Move Next Previous record.
SO we are using the grid API GetNextRow() and GetPreviousRow().
This is working fine in normal scenarios and also within a group.
Suppose say there are three groups created based on priority.
Low,Medium and High.
Low Group has say one record.
Medium Group has say two records.
High Group has say three records.
Now I am in First Group Say "Low"
I selected the first record in that group and if i click next record button it is going to third record of other group record and not the first record in other group.
And also if the next group is not expanded.then it is not selecting any row.
Same issue applies for Previous row functionality also.
Please advice and do the needful.
Regards,
Madhavan
{
nextRow.Select();
}
previousRow.Select();
Hi Madhavan G,
Sorry for the late response. Here are the sample code that I have, of two HTML button to move next and previous of row within a group.function NextButton() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var nextRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex + 1]; var nextRow = grid.GetRowByElement(nextRowElem); if (nextRow != null) { if (nextRow.Type == "Record") { nextRow.Select(); } else { if (nextRow.GroupExpanded == false) nextRow.ExpandGroupRow(); nextRow.GetGroupChildRows()[0].Select(); } } } } } This is the previous button:function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var prevRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex - 1]; var prevRow = grid.GetRowByElement(prevRowElem); if (prevRow != null) { if (prevRow.Type == "Record") { prevRow.Select(); } else { if (prevRow.GroupExpanded == true) prevRow.CollapseGroupRow(); } } } } } I hope it helps and please, do not hesitate to ask if you have any other questions, thank you. Best regards,Andi Santoso.
function NextButton() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var nextRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex + 1]; var nextRow = grid.GetRowByElement(nextRowElem); if (nextRow != null) { if (nextRow.Type == "Record") { nextRow.Select(); } else { if (nextRow.GroupExpanded == false) nextRow.ExpandGroupRow(); nextRow.GetGroupChildRows()[0].Select(); } } } } }
This is the previous button:
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var prevRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex - 1]; var prevRow = grid.GetRowByElement(prevRowElem); if (prevRow != null) { if (prevRow.Type == "Record") { prevRow.Select(); } else { if (prevRow.GroupExpanded == true) prevRow.CollapseGroupRow(); } } } } }
I hope it helps and please, do not hesitate to ask if you have any other questions, thank you.
Best regards,Andi Santoso.
Hi All,
Any Updates on this please.
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