I want hide one column- in that column when i insert new row one value has to assign

Received : 2007/08/06 03:54:24
Message : i want hide one column, in that column when i insert new row one prdefined value should enter. can we do this with this grid? if we can do, how to do that.

This message was posted using Aspose.Live 2 Forum


Please consult the following code using RowInserted event if it fits your need:

private void GridWeb1_RowInserted(object sender, Aspose.Grid.Web.RowColumnEventArgs e)


int row = GridWeb1.ActiveCell.Row;


GridWeb1.WebWorksheets[0].Cells.SetColumnWidth(0,new Unit("0pt"));


Thank you.


You may use WebCells.SetColumnWidth method and set the column's width to 0 pixel to hide the column. And you may handle the GridWeb.RowInserted event to assign the value for the new cell.