If you need to provide custom value editing features using special grid columns within the GanttChartView control from Gantt Chart Web Library, and, of course, to preserve client side changes upon postback server events, you need to follow these steps:
At component initialization time (i.e. in Page_Load method of the Web page or user control, when Page.IsPostBack is false), add custom columns with special CellTemplateClientCode content generating appropriate editors on the client side, setting up the input elements with names that fully identify the component container, column, and item index, and values copied from custom[Key]Value objects passed automatically to the client side from GanttChartItem.CustomValues collection:
GanttChartView.Columns.Add(new Column { Header = "Description", Width = 200, PropertyName = "Description",
CellTemplateClientCode = string.Format(@"
var input = document.createElement('input');
input.setAttribute('name', '{0}_Description_' + item.index);
input.setAttribute('type', 'text');
input.setAttribute('value', item.customDescriptionValue);
return input;", GanttChartView.ClientID) });
After item initialization (e.g. in Page_Load method of the Web page or user control), set GanttChartItem.CustomValues collections, reading input values from the Request.Form collection using the appropriate key strings when Page.IsPostback is true:
for (int i = 0; i < GanttChartView.Items.Count; i++)
GanttChartView.Items[i].CustomValues["Description"] = !IsPostBack ?
"Initial description for Task " + (i + 1) :
Request.Form[GanttChartView.ClientID + "_Description_" + i];