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,
I use selection checkbox (RowChecker) in my grid.
And I cant access which checkbox is clicked in this event :
"WebGrid1.LayoutSettings.ClientSideEvents.OnCheckBoxClick"
How can I access which checkbox clicked, which rows checkbox clicked
and How can understant that is checkbox "All" (that is top of grid and when checked all checkbox es selected) checkBox?
checked checkbox and selected row can not be same.
Can you help me,
Thanks..
In order to access which row checkbox is clicked, we need to get the selected object first. This can be achieved by using “GetSelectedObject()” method. After get the selected object, we can use “ToRowObject()” method to converts supplied HTML row element to WebGridRow object.
function WebGrid1_OnCheckBoxClick(controlId, tblName, colName, checkboxValue, originalCheckBoxValue) { var WebGrid1 = ISGetObject(controlId); var selectedObject = WebGrid1.GetSelectedObject(); if (selectedObject != null) { var selectedRow = selectedObject.ToRowObject(); alert("Row #" + selectedRow.Position + " is checked"); } else alert("Please select a row first"); return true; }
Unfortunately, this script only suitable if user clicks on the checkbox, and not the checkbox “All”. Could you please describe me your scenario so that we can provide another of possible solution of your scenario?
Hi Memo,
OnCheckBoxClick client side event would be invoked only when checkbox is clicked, NOT to handle which checkbox is clicked. I suggest to use a button to check which row checkbox is checked and you can also know what postion of the checked row. Attached is my simple sample to show you how to do it. Hope this helps.
Regards,Handy
Thanks Yudi,
this code is not a solution of my problem.
I want to understand the user clicked "All" or individual row checkbox.
first time I understand "All" with the selectedObject is null, but when user select a row and then click "All", I cant understand user clicked "All" or any row checkbox. Because selectedObject is not null, but user not clicked this selected objects row.
Thanks again.
Hi Handy,
I understood you. It is good, but it is not solution of my problem.
I solved it different way.
Thanks again..
Hi Handy,I understood you. It is good, but it is not solution of my problem.I solved it different way.Thanks again..
Could you please kindly share your solution of this issue with us, so that it would help other developer that might have similar problem?
Thank you.
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