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 am having an issue when trying to change the ForceNoEdit property on selected cells. I can change the property without problems, but in order for the change to take effect I have to select another row, then select the original. Once I've navigated away and back, I can edit the cells. This only happens when I allow editing and not when I disallow it. Any help would be appreciated.
Regards,
James
I tried to reproduce the problem in Client_ProgrammaticEdit.aspx sample file of WebGrid but my efforts were not successful. The sample provides two ways to toggle a column/cell to be editable or not (set EditType to "NoEdit" or invoke SetForceNoEdit(true) method).
Following is the detail of step-by-step when testing the reported problem.
Toggle edit/no edit by setting EditType property.
Toggle edit/no edit by invoking SetForceNoEdit() method.
Should you find anything that I might miss during my attempt to reproduce the reported problem, please feel free to let me know.
I have tested the sample you provided and my issue still exists. As I mentioned, I use the ForceNoEdit method and the problem only exists when the state is being changed from uneditable to editable.
To reproduce the issue:
I modified ToggleNewRowEdit() JavaScript function on the Client_ProgrammaticEdit.aspx by adding few lines that will set the "City" cell to be editable without having to lose focus. After modified, The JS function looks like following:
function ToggleNewRowEdit(){ // retrieves WebGrid's object var grid = ISGetObject("WebGrid1"); // get new row element var newRowElement = grid.RootTable.GetNewRow(); // convert the newRowElement (HTMLElement) to WebGridRow object var newRow = grid.RootTable.ToRowObject(newRowElement); newRow.Select(); // select the new row if (editable) { editable = false; alert("NewRow cell[City] is editable"); } else { editable = true; alert("NewRow cell[City] is not editable"); } // set the cell as editable (false) or not editable (true) newRow.GetCell("City").SetForceNoEdit(editable); // Manually set "City" to be editable if (!editable) { newRow.GetCell("City").ForceNoEdit = false; newRow.GetCell("City").CellElement.noEdit = "False"; } return true; }
I followed the same steps and found that "City" is editable after button-click for the second time.
Hope this helps.
This works correctly, thank you. I believe the code should do this automatically however, and should not require using both the method and manually setting the values.
Glad to know that the script helps.
I will propose this to the WebGrid development team. Should you need further assistance or run into any problems regarding our controls, feel free to post it into our community. We would be happy to assist you again.
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