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" />
</UpdateParameters>
<InsertParameters>
</InsertParameters>
</asp:SqlDataSource>
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:
I added this change and it did nothing. I have also found that hiding some of the id fields will get record to show up with the wrong edit provider in the wrong column.
Here is a screenshot to show what I mean:
Edit:
I think I found exactly what is going on here. As soon as this HWDG becomes a self reference that pushes over all the rows for the expand button. That causes all the editors to not move. This causes you to see an editor one place to show the data one place to the right. Does this make sense? I am guessing this is an error with the code? Is there a work around for this??
I have found a work around to this problem. This was taken from the example on the Infragistics WHDG.
I have changed the code I sent to reflect the change.
<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="700px" ShowFooter="True" StyleSetName="Harvest">
<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 DataFieldName="DetailID" Key="DetailID" Hidden="True">
<Header Text="DetailID" />
<ig:BoundDataField DataFieldName="Reference_DetailID" Key="Reference_DetailID" Hidden="True">
<Header Text="Reference_DetailID" />
</Columns>
<Bands>
<ig:Band DataMember="BookDetail_DataSource_DefaultView" IsSelfReference="true" Key="BookDetail1">
<ig:BoundDataField DataFieldName="Burden" Key="Burden"/>
<ig:BoundDataField DataFieldName="Cost" Key="Cost"/>
<ig:BoundDataField DataFieldName="DetailID" Key="DetailID" Hidden="True"/>
<ig:BoundDataField DataFieldName="Reference_DetailID" Key="Reference_DetailID" Hidden="True"/>
</ig:Band>
</Bands>
<Behaviors>
<ig:EditingCore>
<ig:CellEditing>
<CellEditingClientEvents ExitedEditMode="cellDirty" />
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="Cost" EditorID="CostProvider" />
<ig:EditingColumnSetting ColumnKey="Burden" EditorID="BurdenProvider" />
</ColumnSettings>
<EditModeActions MouseClick="Single" />
</ig:CellEditing>
<ig:RowDeleting />
</Behaviors>
</ig:EditingCore>
<ig:Selection CellClickAction="Row" RowSelectType="Single">
</ig:Selection>
<ig:Activation>
</ig:Activation>
<EditorProviders>
<ig:NumericEditorProvider ID="DetailIDProvider" />
<ig:DropDownProvider ID="BurdenProvider">
<EditorControl DataSourceID="Burden_DataSource"
DropDownContainerMaxHeight="200px" EnableAnimations="False"
EnableDropDownAsChild="False" TextField="Burden" ValueField="Burden">
<DropDownItemBinding TextField="Burden" ValueField="Burden" />
</EditorControl>
</ig:DropDownProvider>
<ig:WebCurrencyEditProvider ID="CostProvider" />
</EditorProviders>
</ig:WebHierarchicalDataGrid>