Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
UltraListView in UserControls
posted

  Hi, i hope you can help me.

  I'm doing some usercontrol in vb.net where i use an ultralistview. I need to expose the property of items and i use something like this:

Public ReadOnly Property Items() As Infragistics.Win.UltraWinListView.UltraListViewItemsCollection
        Get
            Return Me.UltraListView.Items
        End Get
End Property

When I build the project, there're not errors but when I use this usercontrol, item's property is disable.

I use something similar with groups and works perfectly, i can add or remove groups without problems with the Collection Editor.

Public ReadOnly Property Groups() As Infragistics.Win.UltraWinListView.UltraListViewGroupsCollection
        Get
            Return Me.ListViewInf.Groups
        End Get
    End Property

I want to use it like a normal ultralistview and open the ultralistview's designer for this part, so, there's a way to do this or I'm asking for something impossible?

Parents
  • 315
    Verified Answer
    posted

    Perhaps someone else will have a solution for that, but I was unable to get the Infragistics editor to work. However, I was able to get the stock Windows editor to work, which for me was good enough:

    /// <summary>

    /// Returns the collection of <see cref="UltraListViewItem"/> objects.

    /// </summary>

    [Category( "Data" ), Description( "Returns the collection of UltraListViewItem objects." ), DesignerSerializationVisibility( DesignerSerializationVisibility.Content ), ListBindable( true ), Editor( "System.Windows.Forms.Design.ListViewItemCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof( UITypeEditor ) )]

    public UltraListViewItemsCollection Items {

    get { return this.listView == null ? null : this.listView.Items; }

    }

     

     

Reply Children
No Data