in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Cross Reference

Last post 8/28/2008 9:56 AM by Jeff Phillips. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 8/25/2008 4:03 PM

    Cross Reference

    I'm looking for some best practice advice on how to implement a cross-reference feature.

    For our application I'd like to have the ability to Cross Reference any object to any other object using a class similar to the following:

    Public Class CrossReference

    Inherits BaseObject

    Private _referenceTo as BaseObject

    Private _referenceFrom as BaseObject

    Private _comments as String

    Public Property RefereneTo() AS BaseObject

    Get

    Return _referenceTo

    End Get

    Set (ByVal value as BaseObject)

    SetPropertyValue("ReferenceTo", _referenceTo, value)

    End Set

    End Property

    Public Property RefereneFrom() AS BaseObject

    Get

    Return _referenceFrom

    End Get

    Set (ByVal value as BaseObject)

    SetPropertyValue("ReferenceFrom", _referenceFrom, value)

    End Set

    End Property

    Public Property Comments() AS String

    Get

    Return _comments

    End Get

    Set (ByVal value as String)

    SetPropertyValue("Comments", _comments, value)

    End Set

    End Property

    End Class

    Is there a better way to accomplish this?  It also appears that the properties declared as BaseObject don't have an editor displayed on the DetailView.

    Thanks in advance for any help.

  • 8/26/2008 9:38 AM In reply to

    Re: Cross Reference

     Hi Jeff,

     
    I had a not to dissimilar issue with tasks.  I wanted to be able to link a task to any object and be able to get back to the object from the task. To do this I used XPWeakReference to connect to two together. I am not sure if it is the best way or what the performance issues are when there are a large number of items, but you can find the support centre questions using the links below - it is also worth searching for XPWeakReference is Support Centre.
     
    This is to do with XPWeakReference
     
    And this is the task pane that displays the tasks in a navbar container
     
    Unfortunatley the code is in C# rather than VB and is a bit messy as it's mainly for testing various issues in XAF.
     
    Regards
     
    Alastair
  • 8/28/2008 9:56 AM In reply to

    Re: Cross Reference

     Hi Alastair,

    Thanks for the information, I'll check into implementing my solution this way.

    Jeff

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED