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'm having some trouble figuring it out... I know that I need to do this code to get WebGrid's column name by selecting a cell:
var grid = ISGetObject("WebGrid1");var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();var columnName = wgGetColNameByCell(rowElm.cells[3]);alert(columnName);
But... how can I do it without knowing the index for "3" ? I mean, I need to get that number too...
rowElm.cells[3]
Thank you
Sorry if not well explained... but I need to leave know.
Hello Handy,
Thank you for your reply, but unfortunally this code isn't working...
Im having trouble at cellIndex parameter, wich is getting undefined. By the way... i need to use the code as "OnEnterEditMode" (I suppose it would work just as same).
I've tried with "OnCellSelect" too, but it didn't even fired...
<ClientSideEvents OnCellSelect="WebGrid1_OnCellSelect" />
You will need to set CellClickAction="CellSelect" on layout settings in order to make the event to be called. If you want to use EnterEditMode client side event, you can fill the index automatically with editObject.cellElement.cellIndex-1.
Regards,Handy
So, you would like to get also the current cell index and want to put the index automatically to retrieve column Name's, correct? I have snippet codes and hope this would help.
e.g
var cellSel; function WebGrid1_OnCellSelect(controlId, tblName, rowIndex, cellIndex) { var WebGrid1 = ISGetObject(controlId); cellSel = cellIndex; alert(WebGrid1.GetSelectedObject().ToRowObject().GetCells()[cellIndex].Name); return true; } function Button1_onclick() { var WebGrid1 = ISGetObject("WebGrid1"); if (WebGrid1.GetSelectedObject() == null) { alert("Select a cell or a row"); } else { alert(WebGrid1.GetSelectedObject().ToRowObject().GetCells()[cellSel].Name); } }
Here is what I did:
function WebGrid1_OnEnterEditMode(controlId, tblName, editObject) { var WebGrid1 = ISGetObject(controlId); alert(wgGetColNameByCell(editObject.cellElement)); return true; }
More Info
BTW... I guess I've marked the wrong post as answer. Is it possible to unmark it? Ty
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