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

Free Support Forum - aspose.com

Adding a Checkbox to a column in Aspose.Cells.GridWeb .NET

I am currently working on trying to figure out how to add a checkbox to a column if anyone can possibly help me out.

Thanks,

Jennifer

Hi Jennifer,

Well, you can add a checkbox control into cell as a data validation type.

// Forces validation.

GridWeb1.ForceValidation = true;

WebWorksheets sheets = GridWeb1.WebWorksheets;

WebCells cells = sheets[0].Cells;

WebCell cell = cells["C1"];

cell.CreateValidation(ValidationType.CheckBox, true);

cell.Style.HorizontalAlign = HorizontalAlign.Center;

Check the featured demo for further help:

And if you are using databinding you may add checkbox data validation (e.g.., for design time... Open Worksheet Designer dialog, click bindcolumns, select the field and click the validation attribute) to a whole column, check the discontinured column in the demo:

Thank you.

Hi,

I would like to test your Grid and if it is doing what i want, i will take it to replace an other componant (Farpoint).

So, i need to know if we can add any webcontrol (calendar, combobox, …tdc) to the cells of your Web Grid ?

Thnaks,

Hakim

Hi Hakim,

Well, currently you cannot insert the ASP.NET controls to the cells. GridWeb implements its own controls i.e.., To put a combobox, you may set ValidationType.List, ValidationType.FreeList and ValidationType.DropDownList etc. To implement a Calender like control, you may set ValiationType.Date and ValidationType.DateTime. Moreover, if you don't want to check your values when the user enters, you may simply disable the validations. Please check my previous post and check the demo:

Thank you.