Attached a site it has two band hierarchical grid, second band has 'add' behavior added. Can you show how to remove this behavior for the first parent row only ( the one with 'Net Trade01' in first column. so all child grid will have add row functionality except the one under the first row.
Thanks.
Hello mcseidel,
Based on my understanding, you want to implement column moving behavior except first row island. If this is the case I would recommend you to add the behavior in code behind( not in markup) on rowisland bases as shown below:
if (!IsPostBack)
{
CreateDataSource();
var wh=this.whdg.Behaviors.CreateBehavior<Infragistics.Web.UI.GridControls.ColumnMoving>();
foreach (ContainerGridRecord rec in this.whdg.GridView.Rows) {
if (rec.Index == 0) { rec.RowIslands[0].Behaviors.Remove(wh); }
else { rec.RowIslands[0].Behaviors.Add(wh); } } }
I have also attached modified sample.
I hope this helps.
Sorry that is not what I'm looking for, it is slightly different : Let me go over again. There is two band grid, second ( child band ) has a ‘add row’ behavior configured during design time… and when you open every child grid you would see ability to add row in each of it. Here is the question : How to dynamically or otherwise remove ‘add row’ behavior for the topmost child grid, the one that underneath ‘Net Trade01’ parent record. So at the end of exercise every child grid has ‘add row’ behavior except the topmost one. Picture with desired result is attached