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'm disabling some checker cells in the InitializeRow event, but these are somehow still editable through the 'Check All' checkbox that's avaible on the header of the checker column.
I'm disabling the cells in the initializeRow with a snippet like this:
if (e.Row.Type == RowType.Record) { //Get the checker cell WebGridCellCollection cells = e.Row.Cells; var checkerCell = cells[0]; //Randomize bool disabled = cells[2].Text.Length % 2 ==0; checkerCell.ForceNoEdit = disabled; }
But when I click the 'Check All' checkbox they end up checked/unchecked anyways.
Is there a way to prevent this? I was think of reversing the value on the OnCheckBoxClick clientside event, but the issue persists. I was using something like this:
function DoNotCheckDisabled(gridId, tblName, colName, checkboxValue, originalCheckboxvalue) { var grid = ISGetObject(gridId); var row = grid.Tables[tblName].ToRowObject(grid.CheckedRowContext); if (checkerCell = row.GetCell('Checker').ForceNoEdit == true) { row.GetCell('Checker').SetValue(false, true); } }
Any ideas would be appreciated.
Thanks
Please try to put following code into ‘OnCheckBoxClick’ client side event of WebGrid.
function WebGrid1_OnCheckBoxClick(controlId, tblName, colName, checkboxValue, originalCheckBoxValue) { var WebGrid1 = ISGetObject(controlId); var chkBoxElem = WebGrid1.LastChkBox; if (chkBoxElem.getAttribute("disabled") == true) chkBoxElem.checked = originalCheckBoxValue; return true; }
The idea is get the ‘checked’ attribute of the disabled checkbox element to the original checkbox value. Hope this 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