Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
LoadViewState_Exception with BoundDataField
posted

I am getting this exception when I try to add columns to container grid in code. it works fine if I don't add column in code & directly bind the grid to datasource. I am working on Load on Demand sample.

 

 

 

 

 

 

BoundDataField

 

 

field = new BoundDataField(true

);

field.DataFieldName =

 

"WU_ID"

;

field.DataType =

 

"System.Int32"

;

field.Key =

 

"WU_ID"

;

field.Header.Text =

 

"Company Name1"

;

 

 

//field.DataSourceField = new Infragistics.Web.UI.Framework.Data.DataField("WU_ID", typeof(Int32), null, false);

childGrid.Columns.Add(field);