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
350
addnew method error in hierarchical data binding
posted

The help document of Infragistics 7.3 says "If the current ActiveRow does not provide enough context, then an error is thrown. ActiveRow needs to be on a sibling band or a parent band. "
code 1:
For bandcount As Integer = 0 To 2
        .DisplayLayout.Bands(bandcount).Override.AllowAddNew = AllowAddNew.Yes
Next bandcount
.DisplayLayout.Bands(X).AddNew()

code 2:
For bandcount As Integer = 0 To 2
        .DisplayLayout.Bands(bandcount).Override.AllowAddNew = AllowAddNew.Yes
Next bandcount
If .Selected.Rows(0).HasParent Then
   .Selected.Rows(0).ParentRow.Activate()
   .Selected.Rows(0).ParentRow.Selected = True
Else
    .Selected.Rows(0).Activate()
End If
.DisplayLayout.Bands(X).AddNew()


The "AddNew()" method works fine when x=0 but error when x=1 or 2.Why?