<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : SOLVED: EditOptions.Constraints</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : SOLVED: EditOptions.Constraints]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 06:14:25 +0000</pubDate>
  <lastBuildDate>Mon, 14 Jul 2008 09:01:09 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=11403</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[SOLVED: EditOptions.Constraints : I&amp;#039;ve now managed to work...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38321&amp;title=solved-editoptions-constraints#38321</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4337">eswohnai</a><br /><strong>Subject:</strong> 11403<br /><strong>Posted:</strong> 14 July 2008 at 9:01am<br /><br />I've now managed to work around this.<DIV>&nbsp;</DIV><DIV>The work round was to the add the following routine.</DIV><DIV>&nbsp;</DIV><DIV>Thanks for your help</DIV><DIV>&nbsp;</DIV><DIV>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</DIV><DIV>Private Sub grdSample_ValueChanged(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; On Error GoTo ERR_HANDLER<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Column.Index = 1 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Caption = Item.EditOptions.Constraints(Item.Value).Caption<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>ERR_HANDLER:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; MsgBox "Error in Form1.frm::Sub grdSample_ValueChanged: Error " &amp; Err.Number &amp; " - " &amp; Err.Description<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub</DIV>]]>
   </description>
   <pubDate>Mon, 14 Jul 2008 09:01:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38321&amp;title=solved-editoptions-constraints#38321</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: EditOptions.Constraints : Aaron, Thanks for your reply....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38317&amp;title=solved-editoptions-constraints#38317</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4337">eswohnai</a><br /><strong>Subject:</strong> 11403<br /><strong>Posted:</strong> 14 July 2008 at 7:16am<br /><br /><P>Aaron,</P><P>Thanks for your reply.&nbsp; Using the CreateEditOption seems to of done the trick bar one small problem.&nbsp; When I click into the Cell.&nbsp; Even if the text matchs what is in the constrait, it blanks the entry.&nbsp; If I select it from the drop down it is fine.&nbsp; </P><P>As I don't know how to post a sample I will just copy all my current code below.&nbsp; You will need to add a Report Control to a form and call it grdSample.</P><P>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<BR>Option Explicit<BR>Private Sub Form_Load()<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; On Error GoTo ERR_HANDLER<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Call SetupGrid<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Call AddRecordToGrid(1)<BR>&nbsp;&nbsp;&nbsp; Call AddRecordToGrid(2)<BR>&nbsp;&nbsp;&nbsp; Call AddRecordToGrid(3)<BR>&nbsp;&nbsp;&nbsp; Call AddRecordToGrid(4)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>ERR_HANDLER:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; MsgBox "Error in Form1.frm::Sub Form_Load: Error " &amp; Err.Number &amp; " - " &amp; Err.Description<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub<BR>Private Sub AddRecordToGrid(ByVal RecordID As Integer)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; On Error GoTo ERR_HANDLER<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Dim objRecord As ReportRecord<BR>&nbsp;&nbsp;&nbsp; Dim objRecordItem As ReportRecordItem<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set objRecord = grdSample.Records.Add()<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set objRecordItem = objRecord.AddItem(RecordID)<BR>&nbsp;&nbsp;&nbsp; Set objRecordItem = objRecord.AddItem(Trim("Line " &amp; CStr(RecordID)))<BR>&nbsp;&nbsp;&nbsp; Set objRecordItem = objRecord.AddItem("Some random notes")<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set objRecordItem = Nothing<BR>&nbsp;&nbsp;&nbsp; Set objRecord = Nothing<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; grdSample.Populate<BR>&nbsp;&nbsp;&nbsp; grdSample.Redraw<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>ERR_HANDLER:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; MsgBox "Error in Form1.frm::Sub AddRecordToGrid: Error " &amp; Err.Number &amp; " - " &amp; Err.Description<BR>End Sub<BR>Private Sub SetupGrid()<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; On Error GoTo ERR_HANDLER<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; With grdSample<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Set Grid Properties<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowEdit = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FocusSubItems = True<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Clear grid before populating<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Records.DeleteAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.DeleteAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Add Columns<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 0, "ID", 20, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 1, "User", 80, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 2, "Notes", 200, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Set which columns can be edited<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(0).Editable = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(1).Editable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(2).Editable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Add combo to required columns<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(1).EditOptions.AddComboButton<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>ERR_HANDLER:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; MsgBox "Error in Form1.frm::Sub SetupGrid: Error " &amp; Err.Number &amp; " - " &amp; Err.Description<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub<BR>Private Sub grdSample_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; On Error GoTo ERR_HANDLER<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If NewColumn.Index = 1 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.CreateEditOptions<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.ConstraintEdit = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.Constraints.DeleteAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.RemoveButtons<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.AddComboButton<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.Constraints.Add "Line 1", 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.Constraints.Add "Line 2", 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NewItem.EditOptions.Constraints.Add "Line 3", 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grdSample.Redraw<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; <BR>ERR_HANDLER:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; MsgBox "Error in Form1.frm::Sub grdSample_FocusChanging: Error " &amp; Err.Number &amp; " - " &amp; Err.Description<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub<BR></P>]]>
   </description>
   <pubDate>Mon, 14 Jul 2008 07:16:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38317&amp;title=solved-editoptions-constraints#38317</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: EditOptions.Constraints : Hi,   Do youuseCreateEditOption...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38248&amp;title=solved-editoptions-constraints#38248</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 11403<br /><strong>Posted:</strong> 11 July 2008 at 3:16pm<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>Do you&nbsp;use&nbsp;CreateEditOption for a single cell? And use the InplaceButtonDown event to delete all constraints?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Can you upload a sample project?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 11 Jul 2008 15:16:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38248&amp;title=solved-editoptions-constraints#38248</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: EditOptions.Constraints : I have a Report Control where...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38240&amp;title=solved-editoptions-constraints#38240</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4337">eswohnai</a><br /><strong>Subject:</strong> 11403<br /><strong>Posted:</strong> 11 July 2008 at 11:38am<br /><br /><DIV>I have a Report Control where I need to fill a Combo with custom values.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>If there is already one instance of a value on the Grid,&nbsp; when I go to a different row, and go into the Combo that item needs removing.</DIV><DIV>&nbsp;</DIV><DIV>The way I was going to do it to call&nbsp;.EditOptions.Constraints.DeleteAll before repopulating the Constraints but this is removing all entries for my Column.</DIV><DIV>&nbsp;</DIV><DIV>Does any one have any suggestions for getting around this?</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 11 Jul 2008 11:38:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11403&amp;PID=38240&amp;title=solved-editoptions-constraints#38240</guid>
  </item> 
 </channel>
</rss>