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, We recently started using Webgrid 10. We have a webpage in which from clientside we collect cell text on basis of checked checkbox column. The sample code is used from some intersoft support thread. Now, this method is not working properly and sometimes missed some checked rows. Used method is like this function GetSelectedItemIds() { var grid = ISGetObject("WebGrid1"); var rows = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE).getElementsByTagName("tr"); var selectedItems = ""; var count = 0; for (var i = 0; i < rows.length; i++) { if (rows[i].type == "Record") { if (grid.GetRowByElement(rows[i]).GetCell(0).CellElement.childNodes[0].checked) { selectedItems += grid.GetRowByElement(rows[i]).GetCells().GetNamedItem("CustomerName").Text + "#"; count +=1; } } } document.getElementById("hdnSelectedCustomer").value = selectedItems; alert(count ); }please see that whether this method needs some modification !regardsSachin
Hello Sachin,
I managed to modify your function, you could try the following code:
function GetCheckedRows() { var grid = ISGetObject("WebGrid1"); var selectedItems = ""; var totalrows = grid.RootTable.GetCheckedRows().length; for (var i = 0; i < totalrows; i++) { var rows = grid.RootTable.GetCheckedRows(i); var row = grid.GetRowByElement(rows[i]); var cells = row.GetCells().GetNamedItem("CustomerName"); selectedItems += cells.Text + "#"; } }
Hope this helps.
Best Regards,Erwin Sanders
That's good to hear. If you ever find any other difficulties, feel free to contact us through this community forum or through the live chat.
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