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,
When I use client events
I try to get the value of a checkbox. Here is my webgrid
<ISWebGrid:WebGridColumn Caption="<%$ Resources:Resources, grdSelected %>" Name="SelectSeizure" EditType="Checkbox" ColumnType="CheckBox" > </ISWebGrid:WebGridColumn>
and my function :
function OnCellClick(gridId, tblName, rowIndex, cellIndex ) { //alert(id); var grid = ISGetObject(gridId); alert(grid); var row = grid.GetSelectedObject().GetRowObject(); var cells = row.GetCells(); alert(cells.GetNamedItem("SelectSeizure").Text); }
but the GetSelectedObject does an error :
GetSelecteObject is null or not an object.
Any Idea?
Thank you
Nicolas
Hi Nicolas,
Based on your scenario, I believe that it would be better if we used OnRowSelect client side event. Because on OnCellClick client event, it will get the cell object only instead of its row. But, when you use OnRowSelect client side event, you can get the row object and get the cell by its named item.
Here is the snippet of it:
function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var grid = ISGetObject(controlId); var SelectedObject = grid.GetSelectedObject(); var RowObject = SelectedObject.ToRowObject(); var cells = RowObject.GetCells(); alert(cells.GetNamedItem("Discontinued").Value); return true; }
Just for your information, check box only return a value of true or false. It does not contain any text. I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.
Best Regards,
Andi Santoso
Based on your scenario, I believe that it would be better if we used OnRowSelect client side event. Because on OnCellClick client event, there is no object has been retrieved. It will get the cell object only instead of its row. But instead, when you use OnRowSelect client side event, you can get the row object and get the cell by its named item.
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