Adding CheckBoxField to Dynamic GridView - Checkbox won't show

hacker01

New Member
At runtime, I create a few gridviews from XML files (created with XML Serialization from class objects of a certain "base type").When I load the XML File and check for classes that inherit my "base class" I also add a "CheckboxField" to each GridViews column, but it doesn't show when I render it. It's an empty TableCell - but the BoundingField shows perfectly.Why can't add I add CheckBoxField this way, when I can add BoundingFields this way?Some pseudocode:\[code\]foreach (Type_That_Inherits_From_BaseClass){ Add GridView to HtmlGenericContainer Clear Columns foreach (PropertyType.Name from Type_That_Inherits_From_BaseClass) { Add a BoundingField for each PropertyType to GridView.Columns And set DataField, HeaderText, ReadOnly, SortExpression } Add CheckboxField to GridView.Columns Set GridView Attribute = runat="server" Add new DataSet to GridView GridView.DataSource.ReadXml(XML_FILE) that is created from Type_That_Inherits_From_BaseClass GridView.DataBind();}\[/code\]
 
Back
Top