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,
Note:We are using webgrid7 in MOSS 2007 sharepoint webpart. Please check the scenario in the same environment.
We have implemented RowChecker column for rid. We have some business logic based on which we are required to make the entire rows non editable. We are successful to achive this functionality. As you know when you implement the rowchecker column, the grid display’s one common checkbox in column header section using which we can select/deselect all the checkboxes. Our problem here is when user clicks on common checkbox; it will select all the checkboxes regardless of the rows which are marked no editable. This is incorrect behavior.
I need answers for following queries of mine?
1. The disabled checkboxes should not be checked while, when user checks the header column checkbox. Is there any way where we can do it?
2. How can we access the checkbox control for row or header column from server side or client side?, so that we can hide it.
Waiting for your kind reply.
Thanks,
G.S
For issue #1, you could use the OnCheckBoxClick client side event handler, this event will be raise for each checked row. In your case, you will need to set the checked property to the old value if the row checker is disabled. Here is the snippet:
function wgTest_OnCheckBoxClick(controlId, tblName, colName, checkboxValue, originalCheckBoxValue){ var wgTest = ISGetObject(controlId); var chkBoxElem = wgTest.LastChkBox; if (chkBoxElem.getAttribute("disabled") == true) chkBoxElem.checked = originalCheckBoxValue; return true;}
For issue #2, in the OnAfterInitualize client side event handler, you will need to retrieve the checkbox header element and set the display style to none. Here is the snippet:
function wgTest_OnAfterInitialize(controlId){ var wgTest = ISGetObject(controlId); var headerElem = wgTest.RootTable.GetElement(WG40.COLHEADER, WG40.HTMLDIV); headerElem.getElementsByTagName('input')[0].style.display = "none"; return true;}
The snippet use index 0 for the input because the checkbox is the first column in the WebGrid.
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