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 simple situation wherein, I have Intersoft grid and some editable columns in the grid.
I also have a checkbox column in the grid.
Now, the case is that, if user changes any value(text) in one of my grid columns, then I want my checkbox value to be changed i.e. If the checkbox value is true then It should become false.
Here my sample client side code snippet for that:
var checkboxCell = grid.GetSelectedObject().ToRowObject().GetCells().GetNamedItem("MyCheckboxColumn");
I am able to get the Checkbox cell in the above line.
checkboxCell.checked = false;
checkboxCell.SetValue(false, false);
I tried both the above options to set the checkbox value, but it does not change the checkbox value.
The server side code to create the checkbox column:
MyColumn.ColumnType = ColumnType.CheckBox;
MyColumn.EditType = EditType.Checkbox;
MyColumn.FilterEditType = FilterEditType.Checkbox;
I hope this is a simple case which many of us would have already faced. Please let us know if someone knows the solution for this, since this is quite urgent...
I also tried using IsRowChecker property set as True, but then also it did not work, moreover, I do not want to use IsRowChecker since in the future we may have multiple checkboxes in this grid.
Thanks,
Ravinder
Please try to use one of the following snippet code to change checkbox value.
function SetCheckBoxValue(){ // retrieves WebGrid's object var grid = ISGetObject("WebGrid1"); var selectedRowObj = grid.GetSelectedObject().ToRowObject(); var checkboxCell = selectedRowObj.GetCells().GetNamedItem("MyCheckboxColumn"); var cellElement = checkboxCell.GetElement(); // use following code to make checkbox checked cellElement.children[0].checked = true; // use following code to make checkbox unchecked cellElement.children[0].checked = false; // or invoke click() method to simulates the click event on checkbox cellElement.children[0].click(); }
Hope this helps.
Does anyone know the solution for this. This is very urgent request....
Hi Yudi,
It works !!! Thanks a lot!
Glad to know that the snippet code helps.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. 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