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 have a hierachical grid
I want the background color of an expanded row to change and be retained until the row is collapsed.
What is the best way to achieve that please?
The scenario can be implemented by utilizing the OnChildRowExpand and OnChildRowCollapse client-side (JavaScript) event. On each event, set the background color of the row and cells to a color as shown in the following snippet code.
function WebGrid1_OnChildRowExpand(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); // use the code below to set the background color of row element rowEl.style.backgroundColor = "Yellow"; // iterates through each cell element and set its background color for (var i = 0; i < rowEl.cells.length; i++) { rowEl.cells[i].style.backgroundColor = "Yellow"; } return true; } function WebGrid1_OnChildRowCollapse(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); // use the code below to reset the background color of row element rowEl.style.backgroundColor = ""; // iterates through each cell element and reset its background color for (var i = 0; i < rowEl.cells.length; i++) { rowEl.cells[i].style.backgroundColor = ""; } return true; }
A simple sample of is enclosed as attachment for reference.
Please kindly let us know whether this helps or not.
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