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 ?
Hi gvi,
I attempted to replicate this on my end, but did not have any luck. Could you maybe send a small sample our way?
regards,David Young
Hi David,
Here's a sample.
Moreover if you could explain me how to set the default value of parentID to (null) for root creation record, it could be fine.
I hope that you'll help me, cause last time you asked me a sample, i uploaded it and i'll still waiting.So, please have a look to all my recents posts (since june) in the asp.net forums :)
Regards,
Gregory
This workaround works...but I hope that will be corrected in the next release.
Thank you for your help, i don't know how you find this tricky trick !!
Your components are really powerful, but too powerful to be tested in all situations and to have good documentation and samples.
Could you help me for my other issues ?
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....
Did you have AutoGenerateBands="false" on the WHDG?
-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>
So could you set AutoGenerateBands="false" on the top WHDG. I had it set and only had one child in my sample.
Hello Gregory,
I see that you created support ticket CAS-69700-13Q3Y3 for this issue. We will continue our discussion through the support ticket
Hi Dave,
After more tests, your purposed solution is not sufficient.
Cause after adding a row with the addrow on the added band (used for items that have no child), I have no expandable icon and so I'm not able to add a child row to the newly created row.
Have you another trick ?
Gregory.
It don't works.
Could you provide me a working sample ?
In the code behind, in Page Load, do the following.
this.WHDG1.Bands[0].RowAdded += ...
You need to add the event to the band that the child is created from. Or you could handle row island created and add it to the ContainerGrid there.
Now I can Add Row correctly, I want to handle RowAdded/updated/deleted events on server side, in order to display error messages like in this samplehttp://help.infragistics.com/NetAdvantage/ASPNET?page=WebDataGrid_Handling_Server_Side_Exceptions_Using_AJAX.html
I get events on the root items and the root addrow, but for child items I never get those events...
Please help me...