Free Support Forum - aspose.com

Support request from swapna at 10/5/2007 1:23:04 AM

Received : 2007/10/05 01:23:04
Message : hello,
cell=cells["C6"];
cell.createvalidation(ValidationType.anyvalue,true)
OnvalidationErrorClientFunction="MyValidationFunction"


you have given this code for validations but its not working properly.
its giving error here......
OnvalidationErrorClientFunction="MyValidationFunction"
i have written coed in save command like this

WebWorksheet sheet1 = this.GridWeb1.WebWorksheets[0];
WebCells cells = GridWeb1.WebWorksheets[0].Cells;
WebCell cell;
int y = GridWeb1.WebWorksheets[0].Cells.MaxRow;
int x = 2;
while (x < y)
{

cell=sheet1.Cells["A" + x + ""];
cell.CreateValidation(ValidationType.AnyValue,true);



cell = sheet1.Cells["B" + x + ""];
cell.CreateValidation(ValidationType.AnyValue, true);


cell = sheet1.Cells["C" + x + ""];
cell.CreateValidation(ValidationType.AnyValue, true);


cell = sheet1.Cells["D" + x + ""];
cell.CreateValidation(ValidationType.AnyValue, true);



x++;
}
its not working can you give me the proper code and where i have to write that code.


This message was posted using Aspose.Live 2 Forum
Hi,
Could you check if you are not using the correct name for javacript function to set for the client validation.
E.g.,
<agw:gridweb id="GridWeb1" runat="server" OnValidationErrorClientFunction="MyValidationErrorFunction"
ForceValidation="True" Width="707px" Height="410px" PresetStyle="Professional1">

.
.
.
.
.
.
.
It works fine here.

And what is your env. OS, .NET framework, IIS settings and are you using AJAX extension etc.

Thank you.