Hello,
I use a WHDG bound to a self referenced SQL DataSource (like a simple table ID,ParentID, Name).I allowed editingcore & rowadding behaviours and set the EnableInheritance Property to True.
My problem is that i can't add row under records that have no child records.... As there's no children under those records, there's no row island and no more AddRow...
I assume that's a bug, because it works with a WHDG bound to 2 sqlDS like (Orders and OrderDetails).
Can someone help me ?
Sorry, autogeneratebands was false in the sample i sent you.Finally, i add in the rowislandpopulated this :
if (e.Row.RowIslands.Count > 1)e.Row.RowIslands.RemoveAt(1);
And it works.
Could you help me with my others issues ?
So could you set AutoGenerateBands="false" on the top WHDG. I had it set and only had one child in my sample.
-Dave
no. I just add in the sample i send you :
<Bands><ig:Band IsSelfReference="True" Key="ChildBand_0"><Columns><ig:BoundDataField DataFieldName="ID" Key="ID"><Header Text="ID" /></ig:BoundDataField><ig:BoundDataField DataFieldName="Name" Key="Name"><Header Text="Name" /></ig:BoundDataField><ig:BoundDataField DataFieldName="ParentID" Key="ParentID"><Header Text="ParentID" /></ig:BoundDataField></Columns><Behaviors><ig:EditingCore EnableInheritance="True"><Behaviors><ig:CellEditing EnableInheritance="True"><ColumnSettings><ig:EditingColumnSetting ColumnKey="ParentID" ReadOnly="True" /><ig:EditingColumnSetting ColumnKey="ID" ReadOnly="True" /></ColumnSettings></ig:CellEditing><ig:RowAdding EnableInheritance="True"><ColumnSettings><ig:RowAddingColumnSetting ColumnKey="ID" ReadOnly="True" /><ig:RowAddingColumnSetting ColumnKey="ParentID" ReadOnly="True" /></ColumnSettings> </ig:RowAdding> </Behaviors></ig:EditingCore><ig:RowSelectors></ig:RowSelectors></Behaviors></ig:Band></Bands>
Did you have AutoGenerateBands="false" on the WHDG?
Oupsss..
I didn't pay enough attention to the result... If a row has child record, there's two rowisland displayed...
Is there a way to hide the second one ? I tried to set it to visible=false, during the RowIslandsPopulated event with no luck....