I have my grid databound to an ObjectDataSource--the out of the box functionality of the grid does not cover our needs, so we were looking to extend the grid using client-side code.
One problem--how do I add non-bound columns to the grid? When I try, it pukes. Sorry if this is a rudimentary concept that I overlooked. When I tried to use the site search for "databound grid" nothing returned. Nothing valuable was returned from "ObjectDataSource TemplateDataField" either.
When trying to use:
<ig:TemplateDataField Key="ItemSelected">
<Header Text="Select Row" />
<ItemTemplate>
<asp:CheckBox ID="itemCheck" runat="server" />
</ItemTemplate>
</ig:TemplateDataField>
I get:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.] System.Web.UI.ControlCollection.Add(Control child) +11328292 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.get_TemplateContainerControl() +143 Infragistics.Web.UI.Framework.RunBot.InstantiateTemplate(ITemplatedObject item, ITemplate template, String templateContainerID) +142 Infragistics.Web.UI.GridControls.BaseGrid.InstantiateTemplate(ITemplatedGridObject item, ITemplate defaultTemplate, String id) +302 Infragistics.Web.UI.GridControls.WebDataGrid.InstantiateTemplates() +1103 Infragistics.Web.UI.GridControls.WebDataGrid.DataBind() +941 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105 Infragistics.Web.UI.GridControls.WebDataGrid.CreateChildControls() +43 System.Web.UI.Control.EnsureChildControls() +182 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +35 System.Web.UI.WebControls.DataBoundControlHelper.FindControl(Control control, String controlID) +143 System.Web.UI.WebControls.DataBoundControl.GetDataSource() +88 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.GetDataSourceObject(Boolean designModeCheck) +176 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.GetDataSource() +49 System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +255 System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +28 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064