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,
I am able to get the Checked Rows count of the RootTable.
If i have selected a child row,how can i get the Checked Rows count of the selected Row.
In order to get the number of checked rows at the root-table level in client-side, you can try to use following snippet code.
function button1_onclick() { var WebGrid1 = ISGetObject("WebGrid1"); var checkedRowsLength = WebGrid1.RootTable.GetCheckedRows().length; alert(checkedRowsLength); return true; }
Following snippet code shows how to get the number of checked rows at the child-table level in client-side.
function button1_onclick() { var WebGrid1 = ISGetObject("WebGrid1"); var rootTable = WebGrid1.RootTable; var childTable = rootTable.ChildTables[0]; var checkedRowsLength = childTable.GetCheckedRows().length; alert(checkedRowsLength); return true; }
For your specific scenario, get the number of checked rows at child-table level based on the selected parent row, can be implemented by iterating trough the child rows and examine the Checked status.
function button1_onclick() { var WebGrid1 = ISGetObject("WebGrid1"); var parentSelectedRow = WebGrid1.GetSelectedObject().ToRowObject(); var childRows = parentSelectedRow.GetChildRows(); var checkedRowsLength = 0; for (var i = 0; i < childRows.length; i++) { if (childRows[i].Checked) checkedRowsLength++; } alert(checkedRowsLength); return true; }
Hope this helps.
*Edited
Reason: asking member to post in the correct thread
Hello Madhavan,
As you may have noticed, this thread discuss about WebGrid but located under ClientUI area. In the future, please kindly post in the correct topic area as your thread subject would describe.
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