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
590
11.1 UnboundCheckBoxField
posted

I've just upgraded my project to 11.1 with 4.0 framework, and I have a column that I am trying to use the new UnboundCheckBoxField.  I add the column using the properties menu in VS2010, with a key "Assign".  The grid displays correctly in VS2010 but errors when I try to run the page.  Below is the grid, and the 3 errors I recieve...

 

    <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="100%" DataKeyFields="Row_ID">
        <Columns>
            <ig:UnboundCheckBoxField DataType="System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"
                HeaderChecked="False" Key="Assign">
                <Header Text="Assign" />
            </ig:UnboundCheckBoxField>
            <ig:BoundDataField DataFieldName="Row_ID" Key="Row_ID" Hidden="true">
                <Header Text="Row_ID" />
<Header Text="Row_ID"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Prospect_ID" Key="Prospect_ID" Hidden="true">
                <Header Text="Prospect_ID" />
<Header Text="Prospect_ID"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Biz_ID" Key="Biz_ID" Hidden="true">
                <Header Text="Biz_ID" />
<Header Text="Biz_ID"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Call_Type_ID" Key="Call_Type_ID" Hidden="true">
                <Header Text="Call_Type_ID" />
<Header Text="Call_Type_ID"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Full_Name" Key="Full_Name">
                <Header Text="Client" />
<Header Text="Client"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Internal_Sys_Name" Key="Internal_Sys_Name">
                <Header Text="Call Type" />
<Header Text="Call Type"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Call_Back_Date" Key="Call_Back_Date" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy hh:mm tt}">
                <Header Text="Call Back Date" />
<Header Text="Call Back Date"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Assigned_MA" Key="Assigned_MA">
                <Header Text="Assigned MA" />
<Header Text="Assigned MA"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Current_MA" Key="Current_MA">
                <Header Text="Original MA" />
<Header Text="Original MA"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Prospect_Full_Name" Key="Prospect_Full_Name">
                <Header Text="Prospect" />
<Header Text="Prospect"></Header>
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="Company_Name" Key="Company_Name">
                <Header Text="Company" />
<Header Text="Company"></Header>
            </ig:BoundDataField>
        </Columns>

<ClientEvents Initialize="intializeGrid"></ClientEvents>
        <Behaviors>
            <ig:Paging PageSize="100">
            </ig:Paging>
            <ig:Filtering>
                <ColumnSettings>
                    <ig:ColumnFilteringSetting ColumnKey="Assigned_MA" Enabled="false" />
                    <ig:ColumnFilteringSetting ColumnKey="Current_MA" Enabled="false" />
                </ColumnSettings>
            </ig:Filtering>
            <ig:Sorting>
            </ig:Sorting>
            <ig:ColumnResizing>
            </ig:ColumnResizing>
            <ig:EditingCore AutoCRUD="False">
                <Behaviors>
                        <ig:CellEditing Enabled="true">
                            <ColumnSettings>
                                <ig:EditingColumnSetting ColumnKey="Assigned_MA" EditorID="WebDataGrid1_DropDownProvider1" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Current_MA" EditorID="WebDataGrid1_DropDownProvider1" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Full_Name" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Internal_Sys_Name" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Call_Back_Date" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Prospect_Full_Name" ReadOnly="true" />
                                <ig:EditingColumnSetting ColumnKey="Company_Name" ReadOnly="true" />
                            </ColumnSettings>
                        </ig:CellEditing>
                        <ig:RowDeleting />
                    </Behaviors>
            </ig:EditingCore>
        </Behaviors>
        <EditorProviders>
                <ig:DropDownProvider ID="WebDataGrid1_DropDownProvider1">
                    <EditorControl ID="EditorControl1" DropDownContainerMaxHeight="200px" EnableAnimations="False" EnableDropDownAsChild="False" runat="server" DataSourceID="SqlDataSource3" TextField="Full_Name" ValueField="Employee_ID">
<DropDownItemBinding TextField="Full_Name" ValueField="Employee_ID"></DropDownItemBinding>
                    </EditorControl>
                </ig:DropDownProvider>
            </EditorProviders>
            <ClientEvents Initialize="intializeGrid" />
            <EmptyRowsTemplate>
                        <div style="text-align:center; "><br/><br/>
                            <img src="../../images/WebDataGrid/attention.png" align="absmiddle"/>
                                No records returned.
                        </div>
                    </EmptyRowsTemplate>
                    <ErrorTemplate><div style="text-align:center;width:800px;">
                         <img src="../../images/WebDataGrid/error.png" align="absmiddle"/>
                                 An error has occurred! Please contact support.
                    </ErrorTemplate>
    </ig:WebDataGrid>

  1. The 'DataType' property is read-only and cannot be set. 
  2. Infragistics.Web.UI.GridControls.GridFieldCollection must have items of type 'Infragistics.Web.UI.GridControls.GridField'. 'Header' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
  3. Literal content ('</ig:UnboundCheckBoxField>') is not allowed within a 'Infragistics.Web.UI.GridControls.GridFieldCollection'. 

If I try to remove the DataType attribute, the grid will then not display in VS.

 

Also, in code behind, how do I now determine if the row is checked if I am looping through the rows of the grid?