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

Free Support Forum - aspose.com

Gridweb Validation on a Column


I need to create a Validation DropdownList on an entire column of a worksheet which is bound to a Dataset. I managed to create it at cell level but i want to avoid looping all rows and create the validation on the column for each and every row. Is there a way to create the validation on the entire column?



Well, if you are using GridWeb’s Data Binding feature then you may add any validation type for the whole column, see the demo for your reference:

But other than that, I am afraid, you need to loop through each cell in the whole column cells and apply validation for your desired type.


WebWorksheets sheets = GridWeb1.WebWorksheets;
WebCells cells = sheets[0].Cells;
WebCell cell
//Apply validation to C column
for (int i = 0;i<100;i++)
cell = cells[i,2]
cell.CreateValidation(ValidationType.DropDownList, true);


Thank you.