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 went through your documentation for getting keyvalue when we do wedbgrid in groupby mode.
https://www.intersoftsolutions.com/Support/WebGrid/Documentation/topic495.html
function GetCellText() { var grid = ISGetObject("WebGrid1"); var curSelObj = grid.GetSelectedObject(); // get selected object if (curSelObj == null) { alert("No row selected. Please select a row"); } else { var row = curSelObj.GetRowObject(); // get the WebGridRow object if (row.Type == "GroupHeader") { alert("Currently selected row is a Group Row. There is no cell information."); } else if (row.Type == "Record") { var cells = row.GetCells(); // obtain WebGridCellCollection of the specified row. var addressCell = cells.GetNamedItem("Address"); // get the address' WebGridCell object by name. alert("Current selected row's Address cell has this text : " + addressCell.Text + "\nThe cell's value is : " + (addressCell.Value == null ? "No Value" : addressCell.Value)); } } }
on the above method you have clearly mentoined when record type is GroupHeader then "Currently selected row is a Group Row. There is no cell information".
I need KeyValue when webgrid is in Group by mode on OnCellClick(controlId, tblName, rowIdx, cellIdx, cellElm) event.
I am able to get keyvalue when grid is NOT IN group by mode as bellow:
var WebRow = WebGrid1.RootTable.GetRow(rowIdx); if (WebRow != null) { if ((ColumnName == "XYZ") && rowIdx != -1) { if ((browserDocumentMode >= 11 && cellElm.childElementCount > 0) || (browserDocumentMode < 11 && cellElm.all.length > 0)) { openDetails(WebRow.KeyValue); } } }
Please reply ASAP.
Regards
Sachin Jain
OnCellClick client-side event specifies the client side (JavaScript) function that will be invoked when a cell is clicked. It has following event parameter: controlId, tblName, rowIndex, cellIndex, cellEl.
Following snippet code shows how to obtain row's key value in OnCellClick client-side event. Instead of using rowIndex, cellEl parameter is used to obtain row object through GetRowByElement(element) method.
function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl) { // get WebGrid object var grid = ISGetObject(controlId); // get row object var rowObj = grid.GetRowByElement(cellEl); if (rowObj.Type == "Record") alert("Key value of selected row is: " + rowObj.KeyValue); return true; }
This should helps.
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