Hi,
I have a repeating section that made me crazy !
I have an C# event on it! When an attribut has a value (160) an code is
make problem in this event if I try to make:
thisXDocument.View.ExecuteAction("xCollection::insert", "Bisher_32");
that insert me a my section in my form but not in the correct place
That insert my element in the next element of my repeating section!!!
Do you know why?
Little example:
----------------------------------------------------------
| (here is the place where my section need to be insert ) |
|my current textbox where the event is launch |
----------------------------------------------------------
----------------------------------------------------------
| The section is insert here (I don't want this) |
| Next textbox |
----------------------------------------------------------
Thanks
S.Y.M. Wong-A-Ton - 15 Mar 2006 12:16 GMT
I don't quite understand the problem as you've described it, but it sounds as
though the context hasn't been set properly before calling ExecuteAction. Did
you use View.SelectNodes before calling the View.ExecuteAction?
Maybe these two links might help:
http://blogs.msdn.com/infopath/archive/2004/04/07/109189.aspx
http://blogs.msdn.com/infopath/archive/2005/04/08/406620.aspx
---
S.Y.M. Wong-A-Ton
> Hi,
>
[quoted text clipped - 21 lines]
>
> Thanks
DolceVita - 16 Mar 2006 09:31 GMT
Hi,
This don't help me but thanks for the links it's interesting!
No I don't use View.SelectNodes !
My problem is I have a repeating section (AVel) that contain a
repeating choice group ( Betrag and Bisher)!
When I try to make my ExecuteAction I press tabbing for go in the next
AVel that contain a Betrag my event is launch and when the line
ExecuteAction is process my Bisher node is insert in this one not in
the AVel where the event has been launch!
I hope that is clear now!
Thanks one more time!
S.Y.M. Wong-A-Ton - 16 Mar 2006 10:31 GMT
I think that's exactly the problem: You aren't using SelectNodes to set the
correct context before calling ExecuteAction. InfoPath does not know where to
insert, so it picks the first one in the group.
---
S.Y.M. Wong-A-Ton
> Hi,
>
[quoted text clipped - 13 lines]
>
> Thanks one more time!