We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

GridWeb Checkbox

We are having a problem using the checkbox on the GridWeb (Lastest version -

We are displaying Boolean data and the checkboxes display on/off corretly when displayed. However, if users does a postback on the grid using a CustomCommandButton (other actions may also cause issue). Any visual checkbox changes are lost to the user. The actual value is still correct, but it is displayed wrong.

I have created a very simple test project which shows the issue and some screenshots of the incorrect behaviour.

On another minor note. Can you use the keyboard to select check and uncheck the checkbox. If you click into the checkbox the space bar does work. But you have to click first. We want to just use keyboard. With a normal text field on a gird you can enter data by typing which overwrites any previously entered data. But if you click in the field with the mouse you can edit the value. Can you do this action with the keyboard?

Hi Kris,

Please use the code given below. Using this code, the GridWeb will work in the desired way.

Furthermore, We are looking into the possibilies for issue of using Keyboard only with the GridWeb. We will update you as soon as we find any solution.

Code Snippet:
protected void Page_Load(object sender, EventArgs e)

if (!IsPostBack)
grid1.WebWorksheets[0].DataSource = GridItems;


private void CreateGridItems()
GridItems = new List();
TestClass class1 = new TestClass("Test1", false, Convert.ToDecimal(100.00));
TestClass class2 = new TestClass("Test2", true, Convert.ToDecimal(200));
TestClass class3 = new TestClass("Test3", true, Convert.ToDecimal(300.581212));
TestClass class4 = new TestClass("Test4", false, Convert.ToDecimal(299.9112122));

protected void grid1_CustomCommand(object sender, string command)
if (command == "ADDREC")

protected void grid1_Load(object sender, EventArgs e)
CustomCommandButton ccb;

ccb = new CustomCommandButton();
ccb.Command = "ADDREC";
ccb.ToolTip = "Add row";

public class TestClass
private string sDescription;
private bool bFlag;
private decimal dValue;

public TestClass()

public string Description
get { return sDescription; }
set { sDescription = value; }

public bool Flag
get { return bFlag; }
set { bFlag = value; }

public decimal Value
get { return dValue; }
set { dValue = value; }

public TestClass(string pDescription, bool pFlag, decimal pValue)
Description = pDescription;
Flag = pFlag;
Value = pValue;


Please add this following line of code into the web.config file under assemblies section:


I have copied all the code (although I don't see that there are any actual changes) and added the assembly line to our web.config file.

I still have the exact same issue.

The only change in the code you sent is the new reference in the web.config file. Am I missing something?


We found you set the “NumberType” attribute to “General” in “Flag” BindColumn. Please modify it to “General”. The checkbox issue should not be reproduced.

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}


And, to check or uncheck checkbox via spacebar key at client side is supported in Aspose.Cell.GridWeb v2.3.2.2001 (attached).

In this fix, for your knowledge, some properties are obsolete, so may adjust your codes accordingly.

1) The properties of NumberType, Custom and IsLocked in Aspose.Cells.GridWeb.Data.WebCell are obsolete. These properties are added into Aspose.Cells.GridWeb.TableItemStyle.Style.

2) The property of Style in Aspose.Cells.GridWeb.Data.WebCell is obsolete. The recommended alternatives methods are Aspose.Cells.GridWeb.Data.WebCell.GetStyle() and SetStyle().

Thank you.