Community
Profile view has two porfiles and I try to change the Profile1Id in the bottom band from the first profile to the second. I get an error message that "It is not open for write".
The code:
using (Transaction tr = db.TransactionManager.StartOpenCloseTransaction()) { profView = tr.GetObject(profViewId, OpenMode.ForWrite) as ProfileView; ProfileViewBandItemCollection bottomBands = profview.Bands.GetBottomBandItems(); bottomBands[0].Profile1Id = testProfileId2; profview.Bands.SetBottomBandItems(bottomBands); tr.Commit(); }
Solved! Go to Solution.
Profile view has two porfiles and I try to change the Profile1Id in the bottom band from the first profile to the second. I get an error message that "It is not open for write".
The code:
using (Transaction tr = db.TransactionManager.StartOpenCloseTransaction()) { profView = tr.GetObject(profViewId, OpenMode.ForWrite) as ProfileView; ProfileViewBandItemCollection bottomBands = profview.Bands.GetBottomBandItems(); bottomBands[0].Profile1Id = testProfileId2; profview.Bands.SetBottomBandItems(bottomBands); tr.Commit(); }
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Thank you!
Can't find what you're looking for? Ask the community or share your knowledge.