Results 1 to 5 of 5

Thread: [RESOLVED] [2005] Declaring properties on custom control

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    Resolved [RESOLVED] [2005] Declaring properties on custom control

    I am creating a custom control with a gridview on it along with a databindingsource and a databindingnavigator. I have created a custom property datasource, but am stuck on how to add the "new" feature to it so that it can find/create a datasource......

    This is what I have so far.

    VB Code:
    1. <Category("Data"), _
    2.     Description("Indicates the Source of the Control"), _
    3.     RefreshProperties(RefreshProperties.Repaint), AttributeProvider(GetType(IListSource))> _
    4.     Public Property DataSource() As Object
    5.         Get
    6.             Return (Me.dgvEditSearchPanel.DataSource)
    7.         End Get
    8.         Set(ByVal value As Object)
    9.             Me.dgvEditSearchPanel.DataSource = value
    10.         End Set
    11.     End Property
    12.  
    13.     <Category("Data"), _
    14.     Description("Indicates a sub-list of the data source to show in the control.")> _
    15.     Public Property Datamember() As String
    16.         Get
    17.             Return Me.dgvEditSearchPanel.DataMember
    18.         End Get
    19.         Set(ByVal value As String)
    20.             Me.dgvEditSearchPanel.DataMember = value
    21.         End Set
    22.     End Property

    Thank you!

    D
    Last edited by dminder; Dec 21st, 2006 at 04:40 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width