![]() |
Adding Constraints to Record Items |
Post Reply ![]() |
Author | |
gopalreddy_g ![]() Newbie ![]() Joined: 02 May 2009 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 31 July 2009 at 2:07pm |
Hi
I have a column with editoptions and want to add different editoptions constraints to reportrecorditem for each record. I am getting object null reference error while doing this. Here i am providing the code. Please do help me how to overcome the error. I tried the sample tasklist program and got the same error.
Adding columns:
column = AxReportControl1.Columns.Add(Column_AssignedTo, "Assigned To", 50, True)column.Editable = False For I As Integer = 0 To _DTUsers.Rows.Count - 1column.EditOptions.Constraints.Add(_DTUsers.Rows(I)( "UserName") & " - " & _DTUsers.Rows(I)("UserID"), _DTUsers.Rows(I)("ID")) Nextcolumn.EditOptions.ConstraintEdit = Truecolumn.EditOptions.AddComboButton() column.EditOptions.GetInplaceButton(0).InsideCellButton = TrueAdding records:
Item = Record.AddItem(AssignedTo) For Each row As DataRow In _DTUsers1.Rows Item.EditOptions.Constraints.Add(row("UserName") & " - " & row("UserID"), row("ID")) Next Please help me in this regard. |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
What do you mean about TaskList Sample? You did not see picklists?
I already answer on such question - https://forum.codejock.com/forum_posts.asp?TID=14664
Essentially with your code you are assigning picklist items to column-base (common for all items) picklist
If you want to use individual picklist for specific item - use NULL param:
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |