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 to all,
i have a grid with checkbox at the last column,
i need to make only read the row if some condition are true.
Is it possible make read only also the checkbox and how?
Thanks in advance
Hello,Thank you the question regarding WebGrid.To make the row or cell became doesn’t editable (read-only), you could use SetForceNoEdit() JavaScript method.I made a simple runnable sample to show how-to implement the SetForceNoEdit() method.I bind the WebGrid to Access Data Source (Northwind.mdb database & Products table).In use the SetForceNoEdit() method in OnRowSelect client side event.I make the row / data that already Discontinued to become read-only.Here’s the example snippet code how I implement the SetForceNoEdit() method:
function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); var rowObj = WebGrid1.RootTable.ToRowObject(rowEl); var Cells = rowObj.GetCells(); if (Cells[3].Value == true && rowObj.ForceNoEdit == false) { rowObj.SetForceNoEdit(true); Cells[3].SetForceNoEdit(true); // To make the Check Box become read-only } }
I also attached the sample, so that you can see the result as well.Thank you.Regards,Hans.
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