Grid validations

Received : 2007/11/26 22:47:15
Message : hi,
iam swpna. now i have one problem. iam binding dataset to grid. when new row is binding i have given one validation. its working fine but when i insert first row its giving problem.
the iam writing is:
int xx = GridWeb1.WebWorksheets[0].CurrentBindRows+1;
int xy = xx + 1;
//int xx = GridWeb1.WebWorksheets[0].Cells.MaxRow+1;
WebCell cell = GridWeb1.WebWorksheets[0].Cells["BI" + xx + ""];
Validation v = cell.CreateValidation(ValidationType.DropDownList, true);
v.ValueList.Add("pre-lay");
v.ValueList.Add("post-lay");
its adding one more extra row . that is the problem.
if i wont do adding 1 to xx variable if its value is zero its giving invalid cell name.
can you please rectify this problem


This message was posted using Aspose.Live 2 Forum

Hi,

I not very clear about you problem. What does "invalid cell name" refer to? Can you give us a demo project?

Thank you.

Hi,

I am not completely sure about your problem. But I think if you are using Data Binding you should bind your columns in the following way.

E.g.,

Validation v = cell.CreateValidation(ValidationType.DropDownList, true);
v.ValueList.Add("pre-lay");
v.ValueList.Add("post-lay");
sheet.BindColumns["ColumnName"].Validation = v;
.
.
.
.
sheet.DataBind();

Could you elaborate and explain it your issue more in detail. If possible create a sample project with all the source files (.aspx, .cs etc.), zip it to make it one and post us here. We will check it soon.

Thank you.