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
411
Error showing edit value
posted

I am getting a zero to show in the burden field when I go to edit the field. It should be showing the text to edit.

Here is the code:

 

    <ig:WebHierarchicalDataSource ID="Book_WebHierarchicalDataSource" 

        runat="server" EnableEmbeddedJavaScript="False">

        <DataRelations>

            <ig:DataRelation ChildColumns="Reference_DetailID" 

                ChildDataViewID="BookDetail_DataSource_DefaultView" ParentColumns="DetailID" 

                ParentDataViewID="BookDetail_DataSource_DefaultView" />

        </DataRelations>

        <DataViews>

            <ig:DataView ID="BookDetail_DataSource_DefaultView" DataMember="DefaultView" 

                DataSourceID="BookDetail_DataSource" />

        </DataViews>

    </ig:WebHierarchicalDataSource>

    <asp:SqlDataSource ID="BookDetail_DataSource" runat="server" 

        ConnectionString="<%$ ConnectionStrings:Web_AppsConnectionString %>" 

        DeleteCommand="DELETE FROM [CostBook_Book_Detail] WHERE [DetailID] = @DetailID" 

        InsertCommand="INSERT INTO [CostBook_Book_Detail] ([BookID], [Burden], [Cost], [Reference_DetailID]) VALUES (@BookID, @Burden, @Cost, @Reference_DetailID)" 

        SelectCommand="SELECT * FROM [CostBook_Book_Detail] WHERE ([BookID] = @BookID) ORDER BY [DetailID], [Reference_DetailID]" 

 

        UpdateCommand="UPDATE [CostBook_Book_Detail] SET [BookID] = @BookID, [Burden] = @Burden, [Cost] = @Cost, [Reference_DetailID] = @Reference_DetailID WHERE [DetailID] = @DetailID">

        <SelectParameters>

            <asp:ControlParameter ControlID="Book_FormView" Name="BookID" PropertyName="SelectedValue" Type="Int32" />

        </SelectParameters>

        <DeleteParameters>

            <asp:Parameter Name="DetailID" Type="Int32" />

        </DeleteParameters>

        <UpdateParameters>

            <asp:Parameter Name="BookID" Type="Int32" />

            <asp:Parameter Name="Burden" Type="String" />

            <asp:Parameter Name="Cost" Type="Decimal" />

            <asp:Parameter Name="Reference_DetailID" Type="Int32" />

            <asp:Parameter Name="DetailID" Type="Int32" />

        </UpdateParameters>

        <InsertParameters>

            <asp:Parameter Name="BookID" Type="Int32" />

            <asp:Parameter Name="Burden" Type="String" />

            <asp:Parameter Name="Cost" Type="Decimal" />

            <asp:Parameter Name="Reference_DetailID" Type="Int32" />

        </InsertParameters>

    </asp:SqlDataSource>

            <ig:WebHierarchicalDataGrid ID="Detail_WebHierarchicalDataGrid" runat="server" 
                AutoGenerateBands="False" AutoGenerateColumns="False" DataKeyFields="DetailID" 
                DataMember="BookDetail_DataSource_DefaultView" DataSourceID="Book_WebHierarchicalDataSource" 
                IsSelfReference="True" Key="BookDetail_DataSource_DefaultView" Width="500px" ShowFooter="True">
                <ClientEvents MouseDown="WebHierarchicalDataGridMouseDown" />
                <Columns>
                    <ig:BoundDataField DataFieldName="Burden" Key="Burden">
                        <Header Text="Burden" />
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="Cost" Key="Cost">
                        <Header Text="Cost" />
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="BookID" Key="BookID">
                        <Header Text="BookID" />
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="DetailID" Key="DetailID">
                        <Header Text="DetailID" />
                    </ig:BoundDataField>
                    <ig:BoundDataField DataFieldName="Reference_DetailID" Key="Reference_DetailID">
                        <Header Text="Reference_DetailID" />
                    </ig:BoundDataField>
                </Columns>
                <Behaviors>
                    <ig:EditingCore>
                        <Behaviors>
                            <ig:CellEditing>
                                <CellEditingClientEvents ExitedEditMode="cellDirty" />
                                <ColumnSettings>
                                    <ig:EditingColumnSetting ColumnKey="Cost" EditorID="CostProvider" />
                                </ColumnSettings>
                            </ig:CellEditing>
                            <ig:RowDeleting />
                        </Behaviors>
                    </ig:EditingCore>
                    <ig:Selection CellClickAction="Row" RowSelectType="Single">
                    </ig:Selection>
                    <ig:Activation>
                    </ig:Activation>
                </Behaviors>
                <EditorProviders>
                    <ig:WebCurrencyEditProvider ID="CostProvider" />
                </EditorProviders>
            </ig:WebHierarchicalDataGrid>

 

Parents
No Data
Reply
  • 14049
    Offline posted

    That is strange. It appears that the grid thinks that this column is of numeric type. Could you please verify that it is not so in your schema?

    To force a certain type on a column off the grid you can use its DataType property.. Something like:

                        <ig:BoundDataField DataFieldName="Burden" Key="Burden" DataType="System.String">
                            <Header Text="Burden" />
                        </ig:BoundDataField>
Children