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 grid with BatchUpdate enabled and HighlightChanges is set to false. When ever I make a change to the grid from the client side and call AddPendingChanges, the row will be highlated grey.
The problem I have is that I am changing the colour of the cells for 2 columns to indicate that they can be edited once a user checks on the row checker column. When you you do this the whole row becomes grey and the user can not see that the cells are green unless you actually click in that cell and then click out of it.
I have created a sample to indicate. When you check on a row, the cells in the last 2 columns will become green and editable. When you check a row off the cells in the last 2 columns will become white and uneditable. You will notice that after checking the row on or off, the whole row goes grey and you can't tell that the cell has changed colour.
Can you please modify the sample so that it does not make the whole row grey after calling AddPendingChanges?
Please try this.
During your wgProductionTemplateStock_CheckBoxClick function, please set the color mofification cell code after the AddRow operation. Here is the snippet:
productionForecastTemplate.webGridCommon.updateFieldValue(cells, "DefaultWastage", cells.GetNamedItem("DefaultWastage").Value);productionForecastTemplate.webGridCommon.updateFieldValue(cells, "CutSize", cells.GetNamedItem("CutSize").Value);row.AddPendingChanges();if (checkboxValue == true) { var cellElement = cells.GetNamedItem("DefaultWastage").GetElement(); cellElement.style.cssText = "background-color: #8FBC8F !important;"; cellElement = cells.GetNamedItem("CutSize").GetElement(); cellElement.style.cssText = "background-color: #8FBC8F !important;";}else { var cellElement = cells.GetNamedItem("DefaultWastage").GetElement(); cellElement.style.cssText = "background-color: #F4F4F4 !important;"; cellElement = cells.GetNamedItem("CutSize").GetElement(); cellElement.style.cssText = "background-color: #F4F4F4 !important;";}
I also suggest implementing RowSelect client side event to override the selected roe style to the custom row style you have defined. Here is the snippet:
function wgProductionTemplateStock_RowSelect(ctrlId, tblName, rowIndex, rowElem) { var grid = ISGetObject(ctrlId); var rowObj = grid.GetRowByElement(rowElem); var cells = rowObj.GetCells(); var checkboxValue = cells.GetNamedItem("RC").Value; if (checkboxValue == true) { var cellElement = cells.GetNamedItem("DefaultWastage").GetElement(); cellElement.style.cssText = "background-color: #8FBC8F !important;"; cellElement = cells.GetNamedItem("CutSize").GetElement(); cellElement.style.cssText = "background-color: #8FBC8F !important;"; } else { var cellElement = cells.GetNamedItem("DefaultWastage").GetElement(); cellElement.style.cssText = "background-color: #F4F4F4 !important;"; cellElement = cells.GetNamedItem("CutSize").GetElement(); cellElement.style.cssText = "background-color: #F4F4F4 !important;"; } return true;}
The !important tag will be needed for the code to work in IE8.
Hi, I was just wondering if you have been able to reproduce the issue using my sample and if so is there a work around to prevent the issue from happening?
Hi, my application is currently in the Alpha testing phase and is required to go to Beta testing in 15 business days. Can I please get an update on the status of this issue?
Thanks for the reply. Is it the default behaviour of the grid to always highlight every row in the grid grey after calling AddPendingChanges() from the client side even if HighlightChanges is set to false?
This is happening on every grid in my application not just grids that have a row checker column.
I have inquiry this behavior with the developer, he confirms that this is the default behavior in the current WebGrid.
You will need to set the style manually after AddPendingChanges to preserve your custom row style, as shown in my previous post.
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