Hi,
I have used the same approach as mentioned above. But still unable to get the checkbox in header line, but could get the checkbox in other rows with out any issue.
However if i used text in header, it is shown, but any other cell type is not shown.
I am using XML File in the design string which defines other headers.
My Requirement is : upon clicking on search button, the grid view should be populated and displayed and checkbox column should be the last column of grid.
Can you please help, and let me know, what mistake am I doing in the below mentioned code:
Is there something I am missing in the below code ?
int j = sprdPlan.Columns.Count; //total count of columns
sprdPlan.ActiveSheetView.AddColumns(j, 1); //adding extra column
myCheck c1 = new myCheck(); //obj for myCheck Class
sprdPlan.ActiveSheetView.ColumnHeader.Cells[0, j].CellType= c1; //not Working
//sprdPlan.ActiveSheetView.ColumnHeader.Cells[0, j].Text = “DELETE”; //working
for (int i = 0; i < sprdPlan.ActiveSheetView.RowCount; i++)
sprdPlan.ActiveSheetView.Cells[i, j ].CellType = c1;
[Serializable()]
public class myCheck : FarPoint.Web.Spread.CheckBoxCellType
{
public override System.Web.UI.Control PaintCell(string id,
System.Web.UI.WebControls.TableCell parent, FarPoint.Web.Spread.Appearance style,
FarPoint.Web.Spread.Inset margin, object value, bool upperLevel)
{
Control c = base.PaintCell(id, parent, style, margin, value, upperLevel);
CheckBox chk = (CheckBox)c.Controls[0];
chk.Attributes.Add(“onclick”, “myCheckFunction()”);
return c;
}
}