Print Page | Close Window

Adding Constraints to Record Items

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14881
Printed Date: 15 November 2024 at 3:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding Constraints to Record Items
Posted By: gopalreddy_g
Subject: Adding Constraints to Record Items
Date 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 - 1

column.EditOptions.Constraints.Add(_DTUsers.Rows(I)("UserName") & " - " & _DTUsers.Rows(I)("UserID"), _DTUsers.Rows(I)("ID"))

Next

column.EditOptions.ConstraintEdit = True

column.EditOptions.AddComboButton()

column.EditOptions.GetInplaceButton(0).InsideCellButton = True

Adding 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.



Replies:
Posted By: mdoubson
Date Posted: 13 August 2009 at 9:02pm
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 - 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:

 



-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net